10

When I installed react-native-popup-menu, I faced such error.

This is error code

Looking for JS files in
E:\react-native\.............\

Loading dependency graph...(node:9460) UnhandledPromiseRejectionWarning: Error: jest-haste-map: Haste module naming collision: Duplicate module name: react-native Paths: E:\react-native\.............\node_modules\react-native-twitter-signin\node_modules\react-native\package.json collides with E:\react-native\.............\node_modules\react-native\package.json

This error is caused by hasteImpl returning the same name for different files. at setModule (E:\react-native\.............\node_modules\jest-haste-map\build\index.js:551:17) at workerReply (E:\react-native\.............\node_modules\jest-haste-map\build\index.js:613:9) at process._tickCallback (internal/process/next_tick.js:68:7) (node:9460) 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:9460) [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:9460) UnhandledPromiseRejectionWarning: Error: jest-haste-map: Haste module naming collision: Duplicate module name: react-native Paths: E:\react-native\.............\node_modules\react-native-twitter-signin\node_modules\react-native\package.json collides with E:\react-native\.............\heybuddy\node_modules\react-native\package.json

This error is caused by hasteImpl returning the same name for different files. at setModule (E:\react-native\.............\node_modules\jest-haste-map\build\index.js:551:17) at workerReply (E:\react-native\.............\node_modules\jest-haste-map\build\index.js:613:9) at process._tickCallback (internal/process/next_tick.js:68:7) (node:9460) 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)

I tried to find the way to solve this error, but I can't find any solution.

4 Answers 4

3

I solved it by creating a metro.config.js file in the root of the folder with this:

module.exports = {
  resolver: {
    blacklistRE: /#current-cloud-backend\/.*/,
  },
};
Sign up to request clarification or add additional context in comments.

1 Comment

didn't work to me
1

I solved it by adding a new file named "rn-cli.config.js" in the project root folder, with the following contents.

const blacklist = require('metro-config/src/defaults/blacklist');
module.exports = {
    resolver: {
        blacklistRE: blacklist([
            /node_modules\/.*\/node_modules\/react-native\/.*/,
        ])
    },
};

1 Comment

didn't work to me
1

I had this problem and I created a backup of the source files and deleted everything, the whole folder. Deleting node_modules wasn't enough. After getting the files back and using npm install for the packages, it worked.

2 Comments

What 'everything' you deleted?
The whole folder. That's why I did a backup of the source files.
0

Just update the below in metro.config.js file in the root of the folder with this:

module.exports = {
  resolver: {
    blacklistRE: /#current-cloud-backend\/.*/,
  },
};

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.