-
Notifications
You must be signed in to change notification settings - Fork 532
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
Module not found: Error: Cannot resolve module 'react/addons' #12
Comments
This issue is due to the react/addons imports in all of the test files. The import is done for use of ReactTestUtils. Here is React documentation that discusses the addon utilities and how to properly use them. Basically replacing the two lines:
with:
and adding react-addons-test-utils to the NPM dependencies should do the trick. |
I have the same problem. Unfortunately, npm install failed: D:\git\react-form-builder\node_modules\canvas>if not defined npm_config_node_gyp (node "C:\Users\xxxx\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm ERR! canvas@1.6.2 install: npm ERR! Please include the following file with any support request: |
The build is fine after removing canvas from package.json. |
Looks like you might be missing Cairo? What if you install cairo and then try npm install again? I have the osx script below... I'm not sure what the equivalent is on windows. https://cairographics.org/download/ $ brew install pkg-config cairo pango libpng jpeg giflib |
I am using ubuntu. I can npm install canvas and have cairo installed. |
Any fix for this issue? |
Why would we need Cairo if we are not running tests but just want to use the package? |
@blackjk3 Can you take a loot at this and consider adding it to master? https://github.com/mbluemer/react-form-builder/commit/4e4a6a78d454c841d5239c24213f8c29f4457101 |
@blackjk3 Hi! Could you review this issue and try to fix it ? Thanks |
Hey @haymant how did you end up fixing this issue? |
having the same problem @blackjk3 any hope of fixing? |
@blackjk3 also experiencing the same problem. How do we go about this? |
Same issue , any hope for fixing it ? |
I am using react 15.1.0.
I get an error:
ERROR in ./
/react-forms-builder/lib/app.js/react-forms-builder/lib/app.js 1:142-165Module not found: Error: Cannot resolve module 'react/addons' in D:\MySource\web\node_modules\react-forms-builder\lib
@ ./
How can I solve it?
The text was updated successfully, but these errors were encountered: