RN 0.59.8 - Module `react-native` does not exist in Haste module map
See original GitHub issueDescribe the bug When installing storybook with a clean react-native 0.59.8 project storybook is not working due to react-native not being found in the Haste module map.
Here is a repo to reproduce.
To Reproduce Steps to reproduce the behavior:
react-native init storybookexample
npx -p @storybook/cli sb init
react-native start --projectRoot storybook
react-native run-ios --simulator 'iPhone 8'
Expected behavior Seeing default storybook screen.
Screenshots error message
System:
- OS: [e.g. iOS, Windows10, MacOS]
- Browser: Chrome
- Framework: react-native
- Addons: not relevant
- Version:
5.0.11
&4.0.11
React Native Environment Info:
System:
OS: macOS 10.14.4
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 40.38 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.1.0 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28
Build Tools: 26.0.3, 27.0.3, 28.0.2, 28.0.3
System Images: android-19 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.8 => 0.59.8
Additional context I also tried downgrading like described in #6452 but the error doesn’t change.
I also tried replacing the index.js
with export default from './storybook';
but a similar issue occurs saying not being able to finde emotion-theming
in Haste module map, see error message
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Module `react-native-screens` does not exist in the Haste ...
Tried removing node_module multiple time,; tried resetting cache,; Reset Metro Bundler cache,; migrated to androidx properly. But still not ...
Read more >react native unable to resolve module - You.com | The AI ...
You can use most of the node core modules this method. Install it with npm: npm install rn-nodeify ... Module stream does not...
Read more >Module doesn't exist in the Haste module map. : r/reactnative
Hi everyone, I'm having some problems with my application (see image below). I've made sure that my package is installed, followed the steps ......
Read more >React Native Issue: Module Does Not Exist In The Haste ...
0.59.8 project storybook is not working due to reactnative not being found in the Haste module map.. not being able to finde emotiontheming ......
Read more >How to share code between iOS, Android & Web using React ...
projec/node_modules/react-native-dotenv/index.js : Module path does not exist in the Haste module map. Fixed it by adding path explicitly in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue when installing these versions of Storybook:
Solved it by adding
emotion-theming
and@emotion/core
as dev dependencies as explained in the previous comments:I guess these dependencies should be added to Storybook’s dependencies.
Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.0-alpha.41 containing PR #7362 that references this issue. Upgrade today to try it out!
You can find this prerelease on the
@next
NPM tag.