The Wayback Machine - http://web.archive.org/web/20201003061131/https://github.com/verekia/js-stack-from-scratch/issues/243
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with react-jss #243

Open
davidfq opened this issue Aug 23, 2017 · 2 comments
Open

Issue with react-jss #243

davidfq opened this issue Aug 23, 2017 · 2 comments
Labels
bug

Comments

@davidfq
Copy link

@davidfq davidfq commented Aug 23, 2017

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 <SheetsRegistryProvider> is not available in react-jss v7.1.0. I've just changed it to <JssProvider> and everything worked.

watadarkstar added a commit to watadarkstar/js-stack-from-scratch that referenced this issue Sep 10, 2017
Quoting from issue verekia#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 <SheetsRegistryProvider> is not available in react-jss v7.1.0. I've just changed it to <JssProvider> and everything worked.
@watadarkstar
Copy link

@watadarkstar watadarkstar commented Sep 10, 2017

@davidfq I got the same issue, I put in a pull request if you would like to review it and thumbs up it: #245

@verekia verekia added the bug label Sep 27, 2017
@fishear
Copy link

@fishear fishear commented Oct 13, 2017

I got the same issue with react-jss@7.2.0, and I changed to < JssProvider>, it works fine, thanks @davidfq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.