verekia / js-stack-from-scratch

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

Fix Issue with react-jss #245

Closed watadarkstar closed 4 years ago

watadarkstar commented 7 years ago

Quoting from issue https://github.com/verekia/js-stack-from-scratch/issues/243:

At the end of chapter 08, I've got some errors just after src/server/render-app.jsx edit:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.
Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.
    at invariant (/Users/davidfq/Code/js-stack/node_modules/fbjs/lib/invariant.js:44:15)
    at ReactCompositeComponentWrapper.instantiateReactComponent [as _instantiateReactComponent] (/Users/davidfq/Code/js-stack/node_modules/react-dom/lib/instantiateReactComponent.js:74:56)
...

It seems that is not available in react-jss v7.1.0. I've just changed it and everything worked.