colorjs/color-space

Cannot read property 'husl' of undefined

bigtimebuddy opened this issue · 3 comments

The newer versions of husl (6.0.2+) are built using Haxe and no longer exposes private APIs. This package is broken when doing a require('color-space') because of the following line: https://github.com/scijs/color-space/blob/master/husl.js#L20. Could you please adjust to use only the public APIs?

The workaround is to require a specific module by name and not require the husl module, e.g., require('color-space/rgb')

dy commented

@bigtimebuddy yes, that is recommended usage pattern (require('color-space/<target-space>')), because including the whole color-space will unreasonably bloat bundle.

But thanks for the issue.

dy commented

Hm not sure how to fix that but sticking to 5.x version, because public API now is flawed for color-space case.

dy commented

Ok, fixed in 1.14.7