Duplicate module name: Sample
antoine-souesme opened this issue ยท 4 comments
Describe the bug
(node:3022) UnhandledPromiseRejectionWarning: Error: jest-haste-map: @providesModule naming collision:
Duplicate module name: Sample
Paths: /Users/antoinesouesme/Documents/tests/rn-first-born/node_modules/@99xt/first-born/node_modules/react-native/Libraries/Sample/package.json collides with /Users/antoinesouesme/Documents/tests/rn-first-born/node_modules/react-native/Libraries/Sample/package.json
This error is caused by a @providesModule declaration with the same name across two different files.
at setModule (/Users/antoinesouesme/Documents/tests/rn-first-born/node_modules/jest-haste-map/build/index.js:462:17)
at workerReply (/Users/antoinesouesme/Documents/tests/rn-first-born/node_modules/jest-haste-map/build/index.js:512:9)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:3022) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:3022) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
To Reproduce
Steps to reproduce the behavior:
expo init rn-first-born
yarn add -D create-react-class react-native-vector-icons
yarn add @99xt/first-born
Node v10.15.3
Yarn v1.13.0
macOS 10.14.4
Expected behavior
Application is running.
Smartphone (please complete the following information):
- Device: iPhone Xs
- OS: 12.2
- Expo client
Hi @antoine-souesme-needone,
Currently working on fixing that.
As a temporary fix, just delete the node_modules folder generated inside first-born
Delete the folder rn-first-born/node_modules/@99xt/first-born/node_modules
It will work fine after that.
Will close this issue when completely fixed
It works! Thank you for that temporary fix.
Downgrading your deps to "react-native": "0.57.8"
& "react": "16.6.3",
will also resolve the haste-map naming collision.
Also quick note that since you updated to a npm mono repo sometime last night, you should update the README for import:
import { Card } from "@99xt/first-born";
Looks great so far btw. Nice work.
import { Card } from "@99xt/first-born";
Thanks for the tip.
The issue is now fixed in the new patch.