Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java Exception and Error 500 on android-run command #23346

Closed
stephane-r opened this issue Feb 8, 2019 · 1 comment
Closed

Java Exception and Error 500 on android-run command #23346

stephane-r opened this issue Feb 8, 2019 · 1 comment
Labels
Bug Platform: Android Android applications. Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot.

Comments

@stephane-r
Copy link

stephane-r commented Feb 8, 2019

Hi community !

🐛 Bug Report (?)

On a very recent react-native project, i've an Java exception that (apparently) create an classic error 500 type InternalError with metro bundler.

This error is with android-run

image

With classic npm start, the error is other :

Loading dependency graph...(node:1363) UnhandledPromiseRejectionWarning: Error: jest-haste-map: @providesModule naming collision:
  Duplicate module name: react-animated
  Paths: /app/.cache/yarn/v4/npm-react-native-0.57.8-1a840fbe144cd3902cc14313a783ce28efc48cb9/node_modules/react-native/Libraries/Animated/release/package.json collides with /app/node_modules/react-native/Libraries/Animated/release/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
    at setModule (/app/node_modules/metro/node_modules/jest-haste-map/build/index.js:462:17)
    at workerReply (/app/node_modules/metro/node_modules/jest-haste-map/build/index.js:512:9)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:1363) 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:1363) [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:1363) UnhandledPromiseRejectionWarning: Error: jest-haste-map: @providesModule naming collision:
  Duplicate module name: react-animated
  Paths: /app/.cache/yarn/v4/npm-react-native-0.57.8-1a840fbe144cd3902cc14313a783ce28efc48cb9/node_modules/react-native/Libraries/Animated/release/package.json collides with /app/node_modules/react-native/Libraries/Animated/release/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
    at setModule (/app/node_modules/metro/node_modules/jest-haste-map/build/index.js:462:17)
    at workerReply (/app/node_modules/metro/node_modules/jest-haste-map/build/index.js:512:9)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:1363) 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)

Environment

From Docker container :

  React Native Environment Info:
    System:
      OS: Linux 4.15 Debian GNU/Linux 9 (stretch) 9 (stretch)
      CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
      Memory: 6.18 GB / 15.37 GB
      Shell: 4.4.12 - /bin/bash
    Binaries:
      Node: 10.15.1 - /usr/bin/node
      Yarn: 1.13.0 - /usr/bin/yarn
      npm: 6.4.1 - /usr/bin/npm
    SDKs:
      Android SDK:
        API Levels: 26, 27
        Build Tools: 27.0.3

Has anyone ever had the problem ?

Thank you community !

@kelset
Copy link
Contributor

kelset commented Mar 20, 2019

👋 there - sorry for the late reply (as you can see there are a lot of open issues! 😅)

So, by looking at the error message you can see that it says

@providesModule naming collision: Duplicate module name: react-animated

What this implies is that you are having react-animated defined twice in your codebase. Maybe you added a new package that installed a different version? 🤔
One way you can double check that is by running yarn why react-animated.

Because it doesn't seem to be related to RN, I'm going to close this - but feel free to comment further and lmk if that helped, or even provide a repro (which means, a react-native init-ed project with the minimal changes that leads to creating the same issue you are reporting). And if it turns out it's actually caused by RN we can investigate it further 🤗

@kelset kelset closed this as completed Mar 20, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Mar 20, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants