-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Basic example - Duplicate module name: react-native #2733
Description
Bug Report
Currently I am experiencing 2 issues:
-
Circle CI does not build the basic/mlkit example, affecting pull requests 2724, 2723, 2581, 2569 (I verified the Circle CI logs and they are all the same).
-
Local Dev Environment for the basic/mlkit example build fails, but this differs from the Circle CI environment and to solve also issue 1 I would need to test in that specific container environment.
This is a description of issue 2 and related pull request 2735.
The gradle build both in CI and Local Environment has no issues, but Task :app:bundleReleaseJsAndAssets fails.
The errors is caused from a name collision between the examples/basic/node_modules/react-native/package.json and examples/advanced/advanced/node_modules/react-native/package.json.
To Do First
- Did you try latest release?
- Did you try master?
- Did you look for existing matching issues? 1767 seems related, but for iOS and it is closed.
Platforms
The bug is experienced on pull request for Android and Windows side (quoted above).
Description/Current Behaviour
The gradle build both in CI and Local Environment has no issues, but Task :app:bundleReleaseJsAndAssets fails.
The errors is caused from a name collision between the examples/basic/node_modules/react-native/package.json and examples/advanced/advanced/node_modules/react-native/package.json.
> Transform artifact okhttp-urlconnection.jar (com.squareup.okhttp3:okhttp-urlconnection:3.12.1) with JetifyTransform
ERROR: [TAG] Failed to resolve variable '${animal.sniffer.version}'
ERROR: [TAG] Failed to resolve variable '${project.groupId}'
ERROR: [TAG] Failed to resolve variable '${project.version}'
ERROR: [TAG] Failed to resolve variable '${project.groupId}'
ERROR: [TAG] Failed to resolve variable '${project.version}'
ERROR: [TAG] Failed to resolve variable '${project.groupId}'
ERROR: [TAG] Failed to resolve variable '${project.version}'
ERROR: [TAG] Failed to resolve variable '${project.groupId}'
ERROR: [TAG] Failed to resolve variable '${project.version}'
> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
error jest-haste-map: Haste module naming collision:
Duplicate module name: react-native
Paths: /home/fabrizio/Documents/sourcecode/opensource/react-native-camera/examples/basic/node_modules/react-native/package.json collides with /home/fabrizio/Documents/sourcecode/opensource/react-native-camera/examples/advanced/advanced/node_modules/react-native/package.json
This error is caused by `hasteImpl` returning the same name for different files.. Run CLI with --verbose flag for more details.
> Task :app:bundleReleaseJsAndAssets FAILED
additionally I experimented the following bug running the basic example, but I skipped as the advanced example works fine.
Expected Behaviour
CI builds without issues.
Steps to Reproduce
The bug can be reproduced by forking those pull request and running
cd examples/basic/android
chmod +x ./gradlew && ./gradlew clean && ./gradlew build