Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

Object false has no method 'alpha' #39

Open
MoOx opened this issue Oct 15, 2014 · 2 comments
Open

Object false has no method 'alpha' #39

MoOx opened this issue Oct 15, 2014 · 2 comments
Labels

Comments

@MoOx
Copy link

MoOx commented Oct 15, 2014

Not sure what is creating this issue.
Maybe you should catch this error to give source (file:line:column) when possible ?
For the postcss plugins I've made I'm using this function

https://github.com/postcss/postcss-custom-properties/blob/2304d37b59b9ee430f1abf3c2ce5254e23e9b069/index.js#L161-L169

Here is the error I got, not clue where it is, my css is too big :D

events.js:72
        throw er; // Unhandled 'error' event
              ^
TypeError: Object false has no method 'alpha'
    at toRGBColor ($PROJECT/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/csswring/lib/csswring.js:51:13)
    at String.replace (native)
    at wringValue ($PROJECT/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/csswring/lib/csswring.js:94:17)
    at Array.map (native)
    at wringDecl ($PROJECT/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/csswring/lib/csswring.js:305:18)
    at $PROJECT/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/postcss/lib/container.js:402:30
    at Rule.proto$0.each ($PROJECT/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/postcss/lib/container.js:88:20)
    at Rule.Container.WithDecls.proto$0.eachDecl ($PROJECT/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/postcss/lib/container.js:400:21)
    at $PROJECT/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/postcss/lib/container.js:331:36
    at Root.proto$0.each ($PROJECT/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/postcss/lib/container.js:88:20)
@hail2u
Copy link
Owner

hail2u commented Oct 15, 2014

This seems CSSWring's color extraction regexp problem (not CSS). Can you upload your big CSS?

Also I think catching an error like that is not a PostCSS plugin's job.

hail2u pushed a commit that referenced this issue Oct 18, 2014
See #39. This does not fix completely, but suppress an runtime error.
@hail2u hail2u added the bug label Oct 20, 2014
@MoOx
Copy link
Author

MoOx commented Nov 18, 2014

Can't share my CSS sorry.

But I really think csswring should take care of the error it can throw.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants