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

react-dom version conflict with RN 0.45.1 #1284

Closed
tmeasday opened this issue Jun 15, 2017 · 5 comments
Closed

react-dom version conflict with RN 0.45.1 #1284

tmeasday opened this issue Jun 15, 2017 · 5 comments

Comments

@tmeasday
Copy link
Member

The CLI's hardcoded version of react-dom is incompatible with the version of React installed by RN 0.45.1.

Reproduction

# install latest RN
npm install -g react-native-cli

# create RN app
react-native init MyApp

# add storybook
cd MyApp
getstorybook

# try running storybook
npm run storybook

You will get an error due to incompability between [email protected] and [email protected]:

ERROR in ./~/react-dom/lib/ReactMount.js
Module not found: Error: Can't resolve 'react/lib/React' in '/private/tmp/TesterMeTester/node_modules/react-dom/lib'
 @ ./~/react-dom/lib/ReactMount.js 17:12-38
 @ ./~/react-dom/lib/ReactDOM.js
 @ ./~/react-dom/index.js
 @ ./~/@storybook/ui/dist/modules/ui/routes.js
 @ ./~/@storybook/ui/dist/modules/ui/index.js
 @ ./~/@storybook/ui/dist/index.js
 @ ./~/@storybook/react-native/dist/manager/index.js
 @ multi ./storybook/addons.js ./~/@storybook/react-native/dist/manager/index.js

...etc..

Update the reference of react-dom in package.json and it should run again (modulo #1280)

@tmeasday tmeasday added the bug label Jun 15, 2017
@shilman
Copy link
Member

shilman commented Jun 15, 2017

@tmeasday I have confirmed the problem and the fix. 👍

@tmeasday
Copy link
Member Author

OK, I guess we should figure out the version of react-dom based on the react version in package.json?

@Fanghao
Copy link

Fanghao commented Jun 21, 2017

Is it fixed? I still get the error when running 3.1.4.

@tmeasday
Copy link
Member Author

Hi @Fanghao, no, but it is easily fixed on a case-by-case basis. Just run npm upgrade react-dom in your app.

@tmeasday tmeasday self-assigned this Jun 21, 2017
@tmeasday tmeasday added this to the v3.2.0 milestone Jun 23, 2017
tmeasday added a commit that referenced this issue Jun 23, 2017
We need to use an equal version to the `react` version the app is using.

#1284
@tmeasday
Copy link
Member Author

Fixed in 3.1.6!

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

No branches or pull requests

3 participants