Transform fails with: "Cannot read property 'stringify' of undefined"
Closed this issue · 3 comments
fcuenca commented
I get the following error right when trying to use the transform:
TypeError: Cannot read property 'stringify' of undefined
at /Users/fernando/Dev/AffinityApp/node_modules/browserify-css/css-transform.js:119:30
at Function.forEach (/Users/fernando/Dev/AffinityApp/node_modules/browserify-css/node_modules/lodash/dist/lodash.js:3297:15)
If you look at the line in question (css-transform.js:119), what you see is:
var css = css.stringify({
stylesheet: {
rules: [ rule ]
}
});
The file history shows that recently that variable was renamed from "result" to "css", colliding with anothe definition in the outer scope.
I'm not really sure why that causes a problem, but after renaming the variable back, the issue seems to be solved.
cheton commented
Hi fcuenca,
It's fixed in v0.3.3 and has been published to NPM as well. Thank you for your informing.
fcuenca commented
Confirmed. Thanks!!
cheton commented
Added some tests to ensure the browserify-css transform is working