verekia / js-stack-from-scratch

🛠️⚡ Step-by-step tutorial to build a modern JavaScript stack.
MIT License
20.05k stars 1.99k forks source link

Bug with new version of react-jss #202

Open chooie opened 7 years ago

chooie commented 7 years ago

Type of issue: (feature suggestion, bug?)

Bug

Chapter:

08 - Bootstrap and JSS Under Heading - JSS

Reason

yarn add react-jss gives version ^6.0.0. The current boilerplate uses ^5.3.0.

The new version crashes the server when rendering the home route. Rolling back to the older version fixes this issue.

Stacktrace:

TypeError: Cannot read property 'composes' of undefined
    at Array.onProcessRule (/Users/chooie/code/js-stack-boilerplate/node_modules/jss-compose/lib/index.js:69:15)
    at PluginsRegistry.onProcessRule (/Users/chooie/code/js-stack-boilerplate/node_modules/jss/lib/PluginsRegistry.js:56:36)
    at Array.forEach (native)
    at RulesContainer.process (/Users/chooie/code/js-stack-boilerplate/node_modules/jss/lib/RulesContainer.js:125:27)
    at new StyleSheet (/Users/chooie/code/js-stack-boilerplate/node_modules/jss/lib/StyleSheet.js:49:16)
    at Jss.createStyleSheet (/Users/chooie/code/js-stack-boilerplate/node_modules/jss/lib/Jss.js:78:19)
    at ref (/Users/chooie/code/js-stack-boilerplate/node_modules/react-jss/lib/index.js:112:25)
    at Jss.componentWillMount (/Users/chooie/code/js-stack-boilerplate/node_modules/react-jss/lib/index.js:137:28)
    at /Users/chooie/code/js-stack-boilerplate/node_modules/react-dom/lib/ReactCompositeComponent.js:348:23
    at measureLifeCyclePerf (/Users/chooie/code/js-stack-boilerplate/node_modules/react-dom/lib/ReactCompositeComponent.js:75:12)
verekia commented 7 years ago

Thank you for reporting this serious issue :)