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

Cannot resolve module 'react/lib/ReactMount' #20

Closed
rngadam opened this issue Nov 25, 2016 · 1 comment
Closed

Cannot resolve module 'react/lib/ReactMount' #20

rngadam opened this issue Nov 25, 2016 · 1 comment

Comments

@rngadam
Copy link

rngadam commented Nov 25, 2016

affected by this issue:

gaearon/react-hot-loader#417

> npm start

> [email protected] start /Users/rngadam/EIC/src/react-sortable-tree
> cross-env NODE_ENV=development webpack-dev-server --hot --inline --config webpack.config.dev.babel.js

 http://localhost:3001/
webpack result is served from /
content is served from build
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
Time: 6296ms

ERROR in ./src/examples/basicExample/app.js
Module not found: Error: Cannot resolve module 'react/lib/ReactMount' in /Users/rngadam/EIC/src/react-sortable-tree/src/examples/basicExample
 @ ./src/examples/basicExample/app.js 1:318-349
[...many more similar errors...] 

I tried updating to react-hot-loader 3.x but was not successful.

WORKAROUND: modify node_modules/react-hot-loader/index.js from:

'ReactMount = require("react/lib/ReactMount"),'

to

'ReactMount = require("react-dom/lib/ReactMount"),'
@fritz-c
Copy link
Member

fritz-c commented Nov 25, 2016

Thanks for the issue and for looking it up. I'm going to wait on introducing react-hot-loader 3.x until it's out of beta, but in the meantime I've applied a workaround in c4d2abc

@fritz-c fritz-c closed this as completed Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants