running `apps/native-component-list` and `home/` gets Duplicate module name: react-native error

I’m trying send a few commits for expo/expo repository.
And I run apps/native-component-list and home/ for testing my code. But I got stuck in below error.

[12:08:27] (node:97844) UnhandledPromiseRejectionWarning: Error: jest-haste-map: @providesModule naming collision:
[12:08:27]   Duplicate module name: react-native
[12:08:27]   Paths: /Users/tomohirotsukui/dev/github/expo/node_modules/react-native/package.json collides with /Users/tomohirotsukui/dev/github/expo/node_modules/react-native-maps/node_modules/react-native/package.json
[12:08:27]
[12:08:27] This error is caused by a @providesModule declaration with the same name across two different files.
[12:08:27]     at setModule (/Users/tomohirotsukui/dev/github/expo/node_modules/jest-haste-map/build/index.js:462:17)
[12:08:27]     at workerReply (/Users/tomohirotsukui/dev/github/expo/node_modules/jest-haste-map/build/index.js:512:9)
[12:08:27]     at <anonymous>
[12:08:27]     at process._tickCallback (internal/process/next_tick.js:118:7)
[12:08:27] (node:97844) 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)
[12:08:27] (node:97844) [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.
[12:08:27] (node:97844) UnhandledPromiseRejectionWarning: Error: jest-haste-map: @providesModule naming collision:
[12:08:27]   Duplicate module name: react-native
[12:08:27]   Paths: /Users/tomohirotsukui/dev/github/expo/node_modules/react-native/package.json collides with /Users/tomohirotsukui/dev/github/expo/node_modules/react-native-maps/node_modules/react-native/package.json
[12:08:27]
[12:08:27] This error is caused by a @providesModule declaration with the same name across two different files.
[12:08:27]     at setModule (/Users/tomohirotsukui/dev/github/expo/node_modules/jest-haste-map/build/index.js:462:17)
[12:08:27]     at workerReply (/Users/tomohirotsukui/dev/github/expo/node_modules/jest-haste-map/build/index.js:512:9)
[12:08:27]     at <anonymous>
[12:08:27]     at process._tickCallback (internal/process/next_tick.js:118:7)
[12:08:27] (node:97844) 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)

If you have some documents for running these apps or if you have the idea to solve this problem, please help me.

And I want to know how to use expo-yarn-workspace

Hi @ggtmtmgg - is it possible you have not checked out the react-native submodule in the expo repo? Try running git submodule update --init --recursive in the repo root, then run yarn install again and see if that fixes things for you.

@watanabe_yu - there is a readme inside that package’s directory with some information – see https://github.com/expo/expo/tree/master/packages/expo-yarn-workspaces . However, note that this package is only intended for use and supported inside of the expo/expo repo. You’re welcome to try using it elsewhere but ymmv.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.