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

@storybook/react-native error after upgrade to 5.1.10 #7730

Closed
chrisdrackett opened this issue Aug 10, 2019 · 10 comments
Closed

@storybook/react-native error after upgrade to 5.1.10 #7730

chrisdrackett opened this issue Aug 10, 2019 · 10 comments

Comments

@chrisdrackett
Copy link

I upgraded @storybook/react-native from 5.1.9 to 5.1.10 and got the following error when building my app:

[0] [20:48:36] Failed to compile.
[0] [20:48:36] /Users/cwd/src/calm/node_modules/@emotion/native/dist/native.browser.esm.js
[0] [20:48:36] Module not found: Can't resolve 'react-native' in '/Users/cwd/src/calm/node_modules/@emotion/native/dist'

rolling back to 5.1.9 fixed the issue. Might be worth mentioning that this issue is when using expo and shows up when compiling for web or iOS.

@chrisdrackett chrisdrackett changed the title react-native error after upgrade to 5.1.10 @storybook/react-native error after upgrade to 5.1.10 Aug 10, 2019
@shilman
Copy link
Member

shilman commented Aug 10, 2019

Sounds like a yarn/npm issue. Can you try removing node_modules & reinstalling? And if that doesn't work, removing your package lock file also and reinstalling?

@shilman shilman added this to the 5.1.x milestone Aug 10, 2019
@stale
Copy link

stale bot commented Aug 31, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Aug 31, 2019
@trflagg
Copy link

trflagg commented Sep 5, 2019

Hi. Just want to add that I am also getting this exact error

error: bundling failed: Error: Unable to resolve module `react-native` from `[HIDDEN]/storybook/index.js`: Module `react-native` does not exist in the Haste module map or in these directories:
  [HIDDEN]/node_modules

For me, it started after I upgraded react to v16.9 and react-native to 59.0.

I reset watchman, cleared the cache, recreated node_modules, and cleared my emulator's data, but always the same issue. I upgraded to storybook@5.2.0-rc6 but got the same error.

@stale stale bot removed the inactive label Sep 5, 2019
@trflagg
Copy link

trflagg commented Sep 6, 2019

Quick update. I figured out that my problem was from running

storybook start -p 7007 | react-native start --projectRoot storybook

I guess --projectRoot doesn't work anymore.

@shilman
Copy link
Member

shilman commented Sep 6, 2019

@benoitdion @Gongreg Looks like --projectRoot got lost in the server rearchitecture. can either of you help me with an update to MIGRATION.md?

@benoitdion
Copy link
Member

Is react-native-community/cli#259 helpful?

@shilman shilman modified the milestones: 5.1.x, 5.2.x Sep 23, 2019
@stale
Copy link

stale bot commented Oct 14, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Oct 14, 2019
@Gongreg
Copy link
Member

Gongreg commented Nov 3, 2019

Hi, can you try out 5.3.0-alpha.37 ? I think you shouldn't have issues anymore.

@stale stale bot removed the inactive label Nov 3, 2019
@stale
Copy link

stale bot commented Nov 24, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Nov 24, 2019
@stale
Copy link

stale bot commented Dec 24, 2019

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

@stale stale bot closed this as completed Dec 24, 2019
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

5 participants