Tried to jss convert index.css > styles.js (see index.css)
/Users/antoine/.config/yarn/global/node_modules/jss-cli/lib/cssToJss.js:37
const unit = value.substr(value.length - options.unit.length)
^
TypeError: Cannot read property 'substr' of undefined
at stripUnit (/Users/antoine/.config/yarn/global/node_modules/jss-cli/lib/cssToJss.js:37:23)
at /Users/antoine/.config/yarn/global/node_modules/jss-cli/lib/cssToJss.js:50:42
at Array.forEach (native)
at addRule (/Users/antoine/.config/yarn/global/node_modules/jss-cli/lib/cssToJss.js:49:23)
at /Users/antoine/.config/yarn/global/node_modules/jss-cli/lib/cssToJss.js:63:9
at Array.forEach (native)
at toJssRules (/Users/antoine/.config/yarn/global/node_modules/jss-cli/lib/cssToJss.js:59:12)
at module.exports (/Users/antoine/.config/yarn/global/node_modules/jss-cli/lib/cssToJss.js:15:14)
at convert (/Users/antoine/.config/yarn/global/node_modules/jss-cli/bin/jss.js:40:19)
at Command.onConvert (/Users/antoine/.config/yarn/global/node_modules/jss-cli/bin/jss.js:82:26)
In case it helps, I resolved the same error removing css comments from my source.css file.
@darioghilardi @antoinerousseau would you like to send a PR to handle it properly?
@kof I come here too late, great that it was solved anyway. Thanks a lot @sairus2k!
Most helpful comment
@kof I come here too late, great that it was solved anyway. Thanks a lot @sairus2k!