jest-haste-map: Haste module naming collision: react-native
See original GitHub issueCurrent behavior
jest-haste-map: Haste module naming collision: react-native
The following files share their name; please adjust your hasteImpl:
* <rootDir>/node_modules/react-native/package.json
* <rootDir>/../../node_modules/@react-native-community/async-storage/node_modules/react-native/package.json
Failed to construct transformer: { Error: Duplicated files or mocks. Please check the console for more info
at setModule (app/packages/app/node_modules/jest-haste-map/build/index.js:620:17)
at workerReply (app/packages/app/node_modules/jest-haste-map/build/index.js:691:9)
at process._tickCallback (internal/process/next_tick.js:68:7)
mockPath1: 'node_modules/react-native/package.json',
mockPath2:
'../../node_modules/@react-native-community/async-storage/node_modules/react-native/package.json' }
(node:29889) UnhandledPromiseRejectionWarning: Error: Duplicated files or mocks. Please check the console for more info
at setModule (app/packages/app/node_modules/jest-haste-map/build/index.js:620:17)
at workerReply (app/packages/app/node_modules/jest-haste-map/build/index.js:691:9)
at process._tickCallback (internal/process/next_tick.js:68:7)
Expected behavior
It should not duplicate haste
Repro steps
“react-native”: “0.60.4”, “@react-native-community/async-storage”: “1.5.1”,
on a monorepo setup
Install
Environment
- Async Storage version: “1.5.1”,
- React-Native version: “0.60.4”,
- Platform tested: android
- Logs/Error that are relevant:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:46
- Comments:56 (5 by maintainers)
Top Results From Across the Web
jest-haste-map: Haste module naming collision #8114 - GitHub
I have three different packages that all require a specific version of same dependency, but those versions are all different. This situation ...
Read more >Error: jest-haste-map: Haste module naming collision
The error you get indicates that you have two react-native dependencies. One in your main project, one in your xxx module, thus creating...
Read more >Jest-haste-map: Haste module naming collision
Previously i installed react native CLI , which i just uninstall then this issue is solved! remove your old react native global CLI....
Read more >Update name in package.json [#3307971] | Drupal.org
Problem/Motivation The package.json is using gin as the package name, Seeing some warnings in CI: jest-haste-map: Haste module naming ...
Read more >jest-haste-map: Haste module naming collision (AWS, RN)
Coding example for the question jest-haste-map: Haste module naming collision (AWS, RN)-React Native.
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 was having the same issue, I have created a backup folder called
node_modules_backup
as a backup since I has going to remove thenode_modules
to install all the modules again, after I removed thenode_modules_backup
folder, the problem stoped and everything starts to run fine.for those who use AWS Amplify and having duplicated file error from jest-haste-map you can ignore the package.json file inside the #current-cloud-backend folder by adding below code inside metro.config.js file: