-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Metro resolver failed with the latest react-native #18724
Comments
I had the same problem too when migrating, did not resolved it! |
Same problem here, may be related to this issue: Maybe a patch like this could work for now? Help please! |
I'm getting the same error, stopping me from upgrading an entire monorepo |
Same issue here! |
@moonjava2005 Were you able to find a solution for this? |
Also encountering this issue... |
We're using node.js 18, and for us it is the |
Metro can't find any of my third party modules that are symlinked. I tried the above unstable config options, to no avail. Even if I change the reference to the root of my monorepo, the modules still can't be found when building my react-native project. |
Facing the same issue as well. In my case, turning off |
form the error, i think it is related to facebook/react-native#38025. the suggestion is to comment out
|
closing this issue for now |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
After I migrate to the Nx latest, when I run iOS simulator, I got this error
Now I'm not able to start the app
BUNDLE src/main.tsx
error: Error: Cannot resolve url
at /ABC/node_modules/@nx/react-native/plugins/metro-resolver.js:31:15
at Object.resolve (/ABC/node_modules/react-native/node_modules/metro-resolver/src/resolve.js:47:12)
at ModuleResolver.resolveDependency (/ABC/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:79:31)
at DependencyGraph.resolveDependency (/ABC/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph.js:277:43)
at Object.resolve (/ABC/node_modules/react-native/node_modules/metro/src/lib/transformHelpers.js:169:21)
at Graph._resolveDependencies (/ABC/node_modules/react-native/node_modules/metro/src/DeltaBundler/Graph.js:473:35)
at Graph._processModule (/ABC/node_modules/react-native/node_modules/metro/src/DeltaBundler/Graph.js:261:38)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Graph._addDependency (/ABC/node_modules/react-native/node_modules/metro/src/DeltaBundler/Graph.js:372:20)
at async Promise.all (index 2)
Then, I tried to install
url
module, I got another error witherror: Error: Cannot resolve http
. Finally, I tried to installhttp
but the metro always showerror: Error: Cannot resolve http
Expected Behavior
Expected the metro resolver runs smoothly
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
BUNDLE src/main.tsx
error: Error: Cannot resolve url
at /ABC/node_modules/@nx/react-native/plugins/metro-resolver.js:31:15
at Object.resolve (/ABC/node_modules/react-native/node_modules/metro-resolver/src/resolve.js:47:12)
at ModuleResolver.resolveDependency (/ABC/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:79:31)
at DependencyGraph.resolveDependency (/ABC/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph.js:277:43)
at Object.resolve (/ABC/node_modules/react-native/node_modules/metro/src/lib/transformHelpers.js:169:21)
at Graph._resolveDependencies (/ABC/node_modules/react-native/node_modules/metro/src/DeltaBundler/Graph.js:473:35)
at Graph._processModule (/ABC/node_modules/react-native/node_modules/metro/src/DeltaBundler/Graph.js:261:38)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Graph._addDependency (/ABC/node_modules/react-native/node_modules/metro/src/DeltaBundler/Graph.js:372:20)
at async Promise.all (index 2)
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: