Jest-haste-map: Haste module naming collision:

jest-haste-map: Haste module naming collision:myapp


jest-haste-map: Haste module naming collision: react-native
The following files share their name; please adjust your hasteImpl:
* /node_modules/react-native/package.json
* /…/…/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

package.json
{

“name”: “myapp”,

“version”: “0.0.1”,

“private”: true,

“scripts”: {

"android": "react-native run-android",

"ios": "react-native run-ios",

"start": "react-native start",

"test": "jest",

"lint": "eslint ."

},

“dependencies”: {

"react": "16.11.0",

"react-native": "0.62.2"

},

“devDependencies”: {

"@babel/core": "^7.10.2",

"@babel/runtime": "^7.10.2",

"@react-native-community/eslint-config": "^1.1.0",

"babel-jest": "^26.0.1",

"eslint": "^7.2.0",

"jest": "^26.0.1",

"metro-react-native-babel-preset": "^0.59.0",

"react-test-renderer": "16.11.0"

},

“jest”: {

"preset": "react-native"

}

}

Previously i installed react native CLI , which i just uninstall then this issue is solved!
remove your old react native global CLI