question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RN 0.59.8 - Module `react-native` does not exist in Haste module map

See original GitHub issue

Describe 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:

  1. react-native init storybookexample
  2. npx -p @storybook/cli sb init
  3. react-native start --projectRoot storybook
  4. 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:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
anfriiscommented, Jul 5, 2019

I had the same issue when installing these versions of Storybook:

"@storybook/addon-actions": "^5.1.9",
"@storybook/addon-links": "^5.1.9",
"@storybook/addons": "^5.1.9",
"@storybook/react-native": "^5.1.9",
"@storybook/react-native-server": "^5.1.9",

Solved it by adding emotion-theming and @emotion/core as dev dependencies as explained in the previous comments:

yarn add --dev @emotion/core
yarn add --dev emotion-theming

I guess these dependencies should be added to Storybook’s dependencies.

2reactions
shilmancommented, Jul 11, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found