Error "does not exist in the Haste module map" for already installed packages.
See original GitHub issueDo you want to request a feature or report a bug? Maybe a bug.
What is the current behavior?
error: bundling failed: Error: Unable to resolve module `@react-native-community/netinfo`
from `.../src/containers/Main.js`: Module `@react-native-community/netinfo` does not exist
in the Haste module map or in these directories: .../node_modules/@react-native-community
Please Note, this this error is not specific to netinfo
. I also had the same issue with react-native-extra-dimensions-android
.
What is the expected behavior?
Not throw error for already installed packages.
Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.
Mac OS High Sierra
node: v10.14.1
npm: 6.5.0
react-native: 0.59.1
metro.config.js
const blacklist = require('metro-config/src/defaults/blacklist');
module.exports = {
resolver: {
blacklistRE: blacklist([/nodejs-assets\/.*/, /android\/.*/, /ios\/.*/, /unity\/.*/])
},
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false
}
})
}
};
Following steps did not solve the issue:
- remove
node_modules
and reinstalled. - ran
react-native start --reset-cahce
ornpm start -- --reset-cache
- removed
haste-map*
directories from '/tmp` - removed
metro-bundler-cache-*
- cleared watchman
Anyone else having the same issue?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:14
- Comments:8
Top Results From Across the Web
Module 'react-navigation' doesn't exist in the haste module map
I'm facing the problem as "react-navigation is not exist in the haste module map" eventhough I've installed "react-navigation" and ...
Read more >Module doesn't exist in the Haste module map. : r/reactnative
Just run the packager command and start the app which is already installed on your device/simulator in the first instance. Most libraries are...
Read more >"Module does not exist in the Haste module map" problem
I am building the iOS app with React Native(not with expo), and I get the error with the react-native-bip39 module installation. Since I...
Read more >@carimus/metro-symlinked-deps - npm
The primary use case for this package is to support development on ... `your-symlinked-module` does not exist in the Haste module map This ......
Read more >Module fs does not exist in the Haste module map
Moduledateformat does not exist in the Haste module map. and the fix was to explicitly add dateformat as a dependency. Previously it wasn't...
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 guess this is the reason
Same issue here. Looking for solution