Closed newswim closed 8 years ago
same here... with Meteor@1.3.2 and the latest meteor-css-module@1.1.2, I get the same error:
Cannot call method 'substr' of undefined
running with $ meteor --release 1.3.1
solves the issue. Will continue with 1.3.1 while hoping for a fix.
+1 with Meteor@1.3.2.4 and css-module@1.1.2 osx
error message:
node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116
throw error;
^
TypeError: Cannot call method 'substr' of undefined
at Function.
Just posted the react toolbox example app updates; there are 2 configuration changes.
First, Meteor 1.3.2.4 supports importing SCSS files from node_modules, so you need to remove the explicitIncludes
section from package.json. Second, Meteor doesn't support the imports as fully as it does from normal app folders, so we still output the style.scss file as style.js in order for the import './style';
to work; the outputJsFilePath
changes from "{dirname}/{basename}.js"
to "{dirname}/{basename}"
. The ".js" is now automatically added to resolve a different issue.
With that we are almost done with the hacky settings. Hopefully in a future version of Meteor file from node_modules will get the same treatment as files in your app, after which we can remove the outputJsFilePath
entirely.
Works great! Thank you * million, Nathan!
Thanks it works very well now. It is great to be able to use React Toolbox with css modules (instead of inline styles in Material ui).
Works great! Thank you * million, Nathan! +
I first performed
meteor reset
, then updated to the latest versions of Meteor and CSS-Modules, started up the app and got the previously encountered 'substr' error. @gadicc had worked around this prior to 1.1.2 by commenting out this line.. however, afaik this issue was resolved in the last update. Are there any additional steps I should take?In the meantime, I'm running Meteor@1.3.1 and everything seems ok.
Here's the console dump
``` => Started proxy. => Started MongoDB. /Users/dm/.meteor/packages/nathantreid_css-modules/.1.1.2.d7gi9d++os.osx.x86_64+web.browser+web.cordova/plugin.mss.os.osx.x86_64/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116 throw error; ^ TypeError: Cannot call method 'substr' of undefined at Function.pertinent parts of package.json
``` json "cssModules": { "extensions": [ "mss", "scss", "m.styl" ], "globalVariables": [ "node_modules/react-toolbox/lib/_colors.scss", { "theme-building": true }, "client/toolbox-theme.scss" ], "outputJsFilePath": { "node_modules/react-toolbox/.*": "{dirname}/{basename}.js" }, "explicitIncludes": [ "node_modules/react-toolbox" ] } ```