Cannot resolve module 'react/lib/ReactDOM'
I encounter an issue.
I ran command npm install then I ran npm run dev , the iterm point out error:
Cannot resolve module 'react/lib/ReactDOM' in /Users/helen/Downloads/study/superset/superset/superset/assets/node_modules/.15.3.2@react-dom
So I install react-dom again, but it still doesn't work.
I found this file I changed module.exports = require('react/lib/ReactDOM'); to module.exports = require('react/lib/react'); It doesn't have error, but the page seems have no css style.
Can anyone help me resolve this issue?
The error from browser is below:

Did you run npm install while the current working directory was set in the superset/assets folder?
@mistercrunch I did. But it still has this issue:(
跟你遇到一样的问题,按照你的方法改了,但是编译的时候会卡在
running install
running bdist_egg
running egg_info
writing superset.egg-info/PKG-INFO
writing dependency_links to superset.egg-info/dependency_links.txt
writing requirements to superset.egg-info/requires.txt
writing top-level names to superset.egg-info/top_level.txt
reading manifest file 'superset.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
研究了一两天没搞定,请教怎么解决?
2017-01-02 在ubuntu下能编译成功,上面问题是在Mac下
@lstk520 Same problem. Remove or rename it may help. But not sure if it will cause new problem. @TingYinHelen change module.exports = require('react/lib/ReactDOM'); to module.exports = require('react-dom');
What version of node/npm are you running?
+1
ERROR in ./~/.15.3.2@react-dom/index.js
Module not found: Error: Cannot resolve module 'react/lib/ReactDOM' in /Users/eeve/working/python/airbnb/superset/superset/assets/node_modules/.15.3.2@react-dom
@ ./~/.15.3.2@react-dom/index.js 3:17-46
env: node : v7.0.0 npm: 3.10.8
Oh, I found my react version is 15.4.2, but react-dom version is 15.3.2, in 15.4.2 no lib/ReactDOM.js,I re-installed the [email protected] version just fine,But the compilation time seems very slow
after 15.4.0 React DOM implementation has been moved completely to the React DOM package. in the earlier versions react-dom package import the module from react/lib/ReactDOM. but now the module is itself inside the react-dom package ./lib/ReactDOM.
@TingYinHelen As @dnkodi mentioned, React package and browser build no longer "secretly" includes React DOM, please refer to Release Note for [email protected].

Does it works for you?
Find a solution:
- Switch using
cnpminstead ofnpm - Delete the entire
node_modulesdirectory - Re-download all dependencies by
cnpm
That's an old issue that I'm pretty sure got resolved somehow, closing.