[still broken] error: bundling failed: Error: Unable to resolve module `./../react-transform-hmr/lib/index.js
See original GitHub issue- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
Environment
React Native Environment Info:
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i7-6660U CPU @ 2.40GHz
Memory: 319.66 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.11.0 - /usr/local/Cellar/node/10.11.0/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
IDEs:
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.2 => 0.57.2
Description
This is a duplicate of https://github.com/facebook/react-native/issues/21490 – but that ticket is resolved, so I cannot comment there.
Mitigation steps remain the same. It appears that a version lock (perhaps the cyclic dependency between metro and metro-config — I couldn’t track it down) prevents yarn from resolving 0.48.0 of metro.
Reproducible Demo
brew install nvm
brew install yarn --without-node
nvm install v10.11.0
nvm use v10.11.0
npx react-native-cli init myapp
Expected
Yarn installs metro 0.48.0
Actual
Yarn installs:
├─ metro-babel-register@0.47.1
├─ metro-babel7-plugin-react-transform@0.47.1
├─ metro-config@0.47.1
├─ metro-memory-fs@0.47.1
├─ metro-minify-uglify@0.47.1
├─ metro-react-native-babel-preset@0.47.1
├─ metro-source-map@0.47.1
├─ metro@0.47.1
In addition, manually installing metro 0.48.0 in the project doesn’t appear to help because yarn will resolve both dependencies.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:5
Top Results From Across the Web
Ask Question - Stack Overflow
Loading dependency graph, done. error: bundling failed: Error: Unable to resolve module ./../../react-transform-hmr/lib/index.js.
Read more >Evaluating 'expo.default.fileSystem' error - Expo SDK - Forums
im trying to run my app. but i keep getting this error. can anyone help me solve this problem.
Read more >unable to resolve "firebase" from "app.js" - You.com
error : bundling failed: Error: Unable to resolve module @react-native-firebase/app from /Users/primetimetran/Desktop/rnTodoList/App.js : Module .
Read more >ESM Modules Broken - Error resolving module specifier “luxon”.
I am using node v17.4.0 and trying to make a very simple web app. This is the tree structure and I have installed...
Read more >Error: Unable to resolve module `util` – Split Help Center
Running bundle using React Native and Javascript SDK causes an error. Bundling failed: Error: Unable to resolve module `util`.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the tip, @jjenzz! I actually needed:
To ensure all of the metro-related things were at the same version and unduplicated.
Duplicate of #21490