Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Error: jest-haste-map: Haste module naming collision: #190

Open
psalmdawg opened this issue Dec 1, 2018 · 6 comments
Open

Error: jest-haste-map: Haste module naming collision: #190

psalmdawg opened this issue Dec 1, 2018 · 6 comments
Labels

Comments

@psalmdawg
Copy link

This error is caused by hasteImpl returning the same name for different files

I know this has been looked at before, but I just cannot get a fix working and its stopping me from proceeding using AWS.
has anyone had this problem and found a work around solution?

Loading dependency graph...(node:55309) UnhandledPromiseRejectionWarning: Error: jest-haste-map: Haste module naming collision:
Duplicate module name: pulseTrailFunction
Paths: /Users/Pauly/Documents/webs2.0/projects/pulse/pulse_v3/amplify/backend/function/pulseTrailFunction/src/package.json collides with /Users/Pauly/Documents/webs2.0/projects/pulse/pulse_v3/amplify/#current-cloud-backend/function/pulseTrailFunction/src/package.json

This error is caused by hasteImpl returning the same name for different files.
at setModule (/Users/Pauly/Documents/webs2.0/projects/pulse/pulse_v3/node_modules/metro/node_modules/jest-haste-map/build/index.js:551:17)
at workerReply (/Users/Pauly/Documents/webs2.0/projects/pulse/pulse_v3/node_modules/metro/node_modules/jest-haste-map/build/index.js:613:9)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:55309) 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:55309) [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.
(node:55309) UnhandledPromiseRejectionWarning: Error: jest-haste-map: Haste module naming collision:
Duplicate module name: pulseTrailFunction
Paths: /Users/Pauly/Documents/webs2.0/projects/pulse/pulse_v3/amplify/backend/function/pulseTrailFunction/src/package.json collides with /Users/Pauly/Documents/webs2.0/projects/pulse/pulse_v3/amplify/#current-cloud-backend/function/pulseTrailFunction/src/package.json

This error is caused by hasteImpl returning the same name for different files.
at setModule (/Users/Pauly/Documents/webs2.0/projects/pulse/pulse_v3/node_modules/metro/node_modules/jest-haste-map/build/index.js:551:17)
at workerReply (/Users/Pauly/Documents/webs2.0/projects/pulse/pulse_v3/node_modules/metro/node_modules/jest-haste-map/build/index.js:613:9)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:55309) 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: 3)

@torigeorge
Copy link

Same issue here. Do you have an update?

@UnleashedMind
Copy link
Contributor

Did you try to use the solution by nara posted in #172?

@balwinder4264
Copy link

i was facing this issue because i instaall package image slider having react-native in it try to unlink plugin when you start facing this issue.

@RoniqueRicketts
Copy link

@UnleashedMind I tried #172 and it did not help me as it requires the following code to run react-native run-android --config=rn-cli.config.js while --config is not a part of the CLI. Do you have any suggestions?

@RoniqueRicketts
Copy link

RoniqueRicketts commented Jun 19, 2019

@UnleashedMind I tried #172 and it did not help me as it requires the following code to run react-native run-android --config=rn-cli.config.js while --config is not a part of the CLI. Do you have any suggestions?

After publishing this. I did the below setup and it worked.

  1. I created a file name rn-cli.config.js
  2. I then open the file and add ```
    module.exports = {
    resolver: {
    blacklistRE: /#current-cloud-backend/.*/
    }
    };
This is the same setup that other developers mention in issue #172 
3. I relaunch my Android Studio and run my Virtual Phone.
4. I run ``` react-native start --config=rn-cli.config.js --resetCache ``` and like Magic, my app was working. 
5. I am still to figure out how to get this to work with ``` react-native run-android ``` I'm open for suggestions. 


The issue is resolved for me. Thank you all for your help. 
TODAYS DATE 6/19/2019

@hsnMoghadasi
Copy link

it's work for me
#172 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants