-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Importing module breaks build (create-react-app / webpack) #321
Comments
I also have no problem on OSX. I'll try |
There is clearly no problem with this module and there is something very strange going on with my machine. FYI - reinstalling all modules (with Solution: run the same code in a docker container with the same version of node and everything works fine. |
Could this be related to facebook/create-react-app#815? |
@garudacrafts Yep, that's probably the culprit. |
@sirreal Another work around (other than running in a container), would be to identify which node module is falling back to the native copy and add it as a direct dependency in your node_modules. See the latest comments in facebook/create-react-app#1023. |
hi i am having the same issue with this package , I am using |
@Rajat421 As discussed in #1023, the issue was a system copy of a module was erroneously being used (e.g. in place of the copy installed as a dependency of another module in the project). This ended up happening with more than one module and it wasn't related to react-jsonschema-form or any other particular module. It was caused by a bug in react and the webpack build process. A workaround was to identify which module was doing this and install it as a direct dependency (simply npm install it to your project). You should be able to identify the culprit by investigating your stack trace. Another workaround was to unset NODE_PATH as per facebook/create-react-app#1023 (comment). Or you could try to re-install Node.js on your system using another method. But, I'm wondering why you're seeing this issue at all, since it was apparently fixed via facebook/create-react-app#1194. If you're still having problems related to this issue, then I'd suggest you post them there. |
If anyone is inquiring, yeah yarn is the same as npm :
read this: https://yarnpkg.com/lang/en/docs/cli/cache/ . |
Prerequisites
Description
import Form from 'react-jsonschema-form'
breaks app.Steps to Reproduce
react-jsonschema-form
dependency and use it in the project.npm start
), open in browser to see error: `Demo project available here: https://github.com/sirreal/broken-react-jsonschema-form
Relevant file: https://github.com/sirreal/broken-react-jsonschema-form/blob/master/src/App.js
The code is copied nearly verbatim from documentation:
Expected behavior
See
<Form />
component renderedActual behavior
App crashes with error:
Version
The text was updated successfully, but these errors were encountered: