metro
metro copied to clipboard
Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4.js
Report a bug App crash when i turn debug on mode
versions
"react-native": "0.66.0",
"metro-react-native-babel-preset": "0.66.2",
What is the current behavior? The app work fine but it crash when i turn it to debug mode
How can i reproduce the error?
After a yarn dev
and yarn android
when i turn it to debug mode it crash and i can see only the error below
You can test it by your self from here install start-ui native
npx create-start-ui --native myApp
That will scaffold a new folder with the latest version of π Start UI [native] π
Then just go to the created folder cd myApp
and follow the Installation Guide.
What is the error I'm getting?
After a yarn dev
and yarn android
when i turn it to debug mode it crash and i can see only this error
Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4.js from /home/omar/Documents/Projects/JawDay-mobile/.:
None of these files exist:
* debugger-ui/debuggerWorker.aca173c4.js(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
* debugger-ui/debuggerWorker.aca173c4.js/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
at ModuleResolver.resolveDependency (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:107:15)
at DependencyGraph.resolveDependency (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/node-haste/DependencyGraph.js:288:43)
at /home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/lib/transformHelpers.js:129:24
at Server._resolveRelativePath (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:1072:12)
at async Server.requestProcessor [as _processSourceMapRequest] (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:428:37)
at async Server._processRequest (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:389:7)
Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4.js from /home/omar/Documents/Projects/JawDay-mobile/.:
None of these files exist:
* debugger-ui/debuggerWorker.aca173c4.js(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
* debugger-ui/debuggerWorker.aca173c4.js/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
at ModuleResolver.resolveDependency (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:107:15)
at DependencyGraph.resolveDependency (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/node-haste/DependencyGraph.js:288:43)
at /home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/lib/transformHelpers.js:129:24
at Server._resolveRelativePath (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:1072:12)
at async Server.requestProcessor [as _processSourceMapRequest] (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:428:37)
at async Server._processRequest (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:389:7)
this error guide me to metro modules so this is i put the issue here
what is metro config in the project
in file metro.config.js
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
*/
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false, // false because of hermes issue https://github.com/storybookjs/react-native/issues/152
},
}),
},
};
Can someone find solution for this probleme i tested all solutions here but it doesnt work
@omar-bear Can you check which version of @react-native-community/cli-debugger-ui
you have installed? It seems like https://github.com/react-native-community/cli/pull/1307 should have fixed this.
Also, have you tried clearing your Chrome cache?
+1
Deleting the Cache from Google Chrome fixed this issue for me.
Settings -> More Tools -> Clear browsing data
Make sure to select "All time"
Deleting the Cache from Google Chrome fixed this issue for me.
Settings -> More Tools -> Clear browsing data
Make sure to select "All time"
I open debugger in incognito and it doesn't work for me.
Failing for us too. Clearing the cache or anything else doesn't do anything. Any sort of help would be highly appreciated π
I am building an app with react-native (without expo) and it works both on simulator and on actual iPhone. But when I go in debug mode (Shake and Debug with Chrome) on simulator, the screens turns black. In my opinion the app is still running, because I get the same error messages as before but I can't do anything.
All of the dependencies are up to date and reset of entire project doesn't help either. Does anyone experience the same issues and is there any fix?
Same problem here, I've tried everything and it didn't work I formatted my machine and nothing, the worst thing is that I'm in the final stage of the project and late.
Can someone who's experiencing this issue provide a minimal repro case for me to look at? Ideally as a GitHub repo plus step-by-step instructions (that include clearing Chrome's cache and restarting the debug session).
Can someone who's experiencing this issue provide a minimal repro case for me to look at? Ideally as a GitHub repo plus step-by-step instructions (that include clearing Chrome's cache and restarting the debug session).
You can install the project in the issue description and debug it directly, thanks βΊοΈ
Since version 2.x of react-native-reanimated does not yet support remote debugging (https://docs.swmansion.com/react-native-reanimated/docs/#known-problems-and-limitations), I downgraded to Version 1.13.1. and the debugger finally worked again. Unfortunately I do not know yet, if the lower version of react-native-reanimated has any impact on other libraries which rely on it (react-navigation for example). I hope this helps a little. :)
am facing same issue with "react-native":"0.65.2"
app works fine ,but crashes in debug mode
Same issue here. At the very least, it needs to throw a better error than this. Our packages are:
"@react-native-community/blur": "^3.6.0",
"@react-native-masked-view/masked-view": "^0.2.6",
"@react-navigation/bottom-tabs": "^6.0.9",
"@react-navigation/native": "^6.0.6",
"@react-navigation/stack": "^6.0.11",
"fastestsmallesttextencoderdecoder": "^1.0.22",
"joi": "^17.5.0",
"moment": "^2.29.1",
"react": "17.0.2",
"react-error-boundary": "^3.1.4",
"react-native": "0.66.3",
"react-native-app-auth": "^6.4.0",
"react-native-gesture-handler": "^1.10.3",
"react-native-iap": "^7.5.1",
"react-native-keychain": "^8.0.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-markdown-display": "^7.0.0-alpha.2",
"react-native-orientation-locker": "^1.4.0",
"react-native-pager-view": "^5.4.9",
"react-native-reanimated": "^2.3.0",
"react-native-redash": "^16.2.3",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.10.1",
"react-native-shared-element": "^0.8.3",
"react-native-svg": "^12.1.1",
"react-native-url-polyfill": "^1.3.0",
"react-native-vector-icons": "^8.1.0",
"react-native-video": "^5.2.0",
"react-native-webview": "^11.16.0",
"react-navigation-shared-element": "^3.1.3",
"react-query": "3.24.4"
I had similar issue, and I found out that react-native-reanimated package caused the issue for me. Please note that Reanimated 2 doesn't support remote debugging, only Flipper can be used for debugging. https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/
I am experiencing this same error although am not using metro-react-native-babel-preset
, just metro
. What I've found is booting up a brand new expo project (SDK 44, comes with metro 0.64) and upgrading to metro 0.65.2 causes the debugger issue, and downgrading back to 0.64 resolves it
I had similar issue, and I found out that react-native-reanimated package caused the issue for me. Please note that Reanimated 2 doesn't support remote debugging, only Flipper can be used for debugging. https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/
how to debug webSocket in flipper?
The issue still persist in "react-native": "0.67.2" any help here?
same issue for me
Do you use "react-native-performance"?
Installing @react-native-community/cli-debugger-ui + clearing application data in inspect solved this to me.
Fixed for me with upgrade react-native-reanimated
to 2.7.0
@react-native-community/cli-debugger-ui
This is not helping for me I'm afraid π
It started after I built the app to an iPhone.
Could it be react-native-iap
? that's the only thing I installed recently.
I've spend two days trying to solve this problem, but couldn't find any solution, so what I'm doing now is debug the app with Flipper, I don't like as much debug with Chrome but is the only solution I have found
Installing @react-native-community/cli-debugger-ui + clearing application data in inspect solved this to me.
This worked for me. I did both the install and clearing the Expo data + cache in the phone.
Expo
build app doesn't crash but still log the same error for me when debugger
is on:
Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4
same issue, Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4. Worked for me to uninstall Expo from Android, run expo start again, open on android, it install expo again on my device and then in worked.
I face the error when I enable debug mode on the expo app
@lid3rs I tried your step but still the same problem
Version 68.2 and noting!!!
I am on macOS, I installed React Native Debugger brew install react-native-debugger
as it was adviced in corresponding section in the expo documentation https://docs.expo.dev/workflow/debugging/ , and the error was gone, so I was able to debug the app in vscode
I've spend two days trying to solve this problem, but couldn't find any solution, so what I'm doing now is debug the app with Flipper, I don't like as much debug with Chrome but is the only solution I have found
WEIRD but true! I try to connect my app with flipper, it fails to connect but solve my issue. Still shows the same error in terminal but debugger is running on chrome devtool smoothly!