cli icon indicating copy to clipboard operation
cli copied to clipboard

Unable to resolve module `./debugger-ui/ui.cc464243.js` from ``

Open mmafrar opened this issue 6 years ago • 122 comments

Environment

System: OS: macOS High Sierra 10.13.6 CPU: (4) x64 Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz Memory: 2.28 GB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 13.7.0 - /usr/local/bin/node Yarn: Not Found npm: 6.13.6 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 10.1/10B61 - /usr/bin/xcodebuild Languages: Python: 2.7.10 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: ^16.11.0 => 16.11.0 react-native: ^0.62.0 => 0.62.0 npmGlobalPackages: react-native: Not Found

Description

Hi there! I'm a React Native newbie working on an interesting side project. Recently I updated project's @react-native-community/cli-debugger-ui version to 4.2.1 and had to come across below issue. Tried several workarounds, nothing worked. Reverting back @react-native-community/cli-debugger-ui version to 3.0.0 resolved the issue.

Error: Unable to resolve module ./debugger-ui/ui.cc464243.js from ``:

None of these files exist:

  • debugger-ui/ui.cc464243.js(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
  • debugger-ui/ui.cc464243.js/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx) at ModuleResolver.resolveDependency (DIR/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15) at ResolutionRequest.resolveDependency (DIR/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18) at DependencyGraph.resolveDependency (DIR/node_modules/metro/src/node-haste/DependencyGraph.js:287:16) at DIR/node_modules/metro/src/lib/transformHelpers.js:267:42 at Server. (DIR/node_modules/metro/src/Server.js:841:41) at Generator.next () at asyncGeneratorStep (DIR/node_modules/metro/src/Server.js:99:24) at _next (DIR/node_modules/metro/src/Server.js:119:9)

Reproducible Demo

  • Setup a project with @react-native-community/cli-debugger-ui using version 3.0.0.
  • Build and run the application and enable debugger.
  • Update @react-native-community/cli-debugger-ui to version 4.2.1.
  • Rerun the app and above error will be displayed on Metro Bundler console.
  • Revert @react-native-community/cli-debugger-ui back to version 3.0.0.
  • Rerun the application and issue will disappear.

mmafrar avatar Mar 29 '20 14:03 mmafrar

+ Had the same problem, please help!

VitaliyGaliy avatar Apr 03 '20 07:04 VitaliyGaliy

I followed the steps and couldn't reproduce this issue. Initializing the new [email protected] project also works. Perhaps you could provide some reproduction repo?

Esemesek avatar Apr 04 '20 20:04 Esemesek

@Esemesek you need to have the Debug mode turned on. While remote debugger runs on web browser above error message appears on Metro Bundler console.

I will attached the both versions of package-lock.json file. You can get a diff, the change caused the issue. Let me know if you need any further details from me.

package-lock-v1.txt

package-lock-v2.txt

mmafrar avatar Apr 05 '20 02:04 mmafrar

Obviously, I was testing with the debugger on. I was able to reproduce your issues upon applying diff you provided. I was able to fix this issue by starting the debugger with --reset-cache flag. Tell me if this fixes your issue.

Esemesek avatar Apr 05 '20 08:04 Esemesek

I'm using npx to run the app, not sure whether I can pass --reset-cache flag with that.

mmafrar avatar Apr 05 '20 17:04 mmafrar

You should be able to use flag even if you use npx, but pretty sure you shouldn't use it. We use npx only to initialize the new projects.

Esemesek avatar Apr 05 '20 17:04 Esemesek

I ran npm start -- --reset-cache and then started the app using react-native run-ios, but the issue still exists. Previously I used npx react-native run-ios to run the app.

Will it be possible for you to list the commands I need to execute? So that I can do a retry.

mmafrar avatar Apr 05 '20 20:04 mmafrar

I completely reboot my OS mojave, and from the first start I have this issue!!! Please help!

None of these files exist:

  • debugger-ui/ui.cc464243.js(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
  • debugger-ui/ui.cc464243.js/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx) at ModuleResolver.resolveDependency (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15) at ResolutionRequest.resolveDependency (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18) at DependencyGraph.resolveDependency (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/node-haste/DependencyGraph.js:287:16) at /Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/lib/transformHelpers.js:267:42 at Server. (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/Server.js:841:41) at Generator.next () at asyncGeneratorStep (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/Server.js:99:24) at _next (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/Server.js:119:9) Error: Unable to resolve module ./debugger-ui/ui.7beef9ab.css from ``:

VitaliyGaliy avatar Apr 06 '20 06:04 VitaliyGaliy

I completely reboot my OS mojave, and from the first start I have this issue!!! Please help!

None of these files exist:

debugger-ui/ui.cc464243.js(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx) debugger-ui/ui.cc464243.js/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx) at ModuleResolver.resolveDependency (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15) at ResolutionRequest.resolveDependency (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18) at DependencyGraph.resolveDependency (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/node-haste/DependencyGraph.js:287:16) at /Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/lib/transformHelpers.js:267:42 at Server. (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/Server.js:841:41) at Generator.next () at asyncGeneratorStep (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/Server.js:99:24) at _next (/Volumes/Samsung_T5/iMac/work/videoCalls/node_modules/metro/src/Server.js:119:9) Error: Unable to resolve module ./debugger-ui/ui.7beef9ab.css from ``:

VitaliyGaliy avatar Apr 06 '20 06:04 VitaliyGaliy

@VitaliyGaliy Got this issue and manage to fix it by deleting yarn.lock then run yarn install. It may got some version conflict when upgrading packages.

r0b0t3d avatar Apr 06 '20 08:04 r0b0t3d

I didn use yarn this time. Just npm install from the first start on the new OS.

VitaliyGaliy avatar Apr 06 '20 08:04 VitaliyGaliy

So, you should try delete package-lock file then run npm install again

r0b0t3d avatar Apr 06 '20 08:04 r0b0t3d

No difference, it happens even with a new created react native app npx react-native init MyTestApp

MAP ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1)Error: Unable to resolve module ./debugger-ui/debuggerWorker.d9da4ed7.js from ``:

None of these files exist:

  • debugger-ui/debuggerWorker.d9da4ed7.js(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
  • debugger-ui/debuggerWorker.d9da4ed7.js/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)

VitaliyGaliy avatar Apr 06 '20 10:04 VitaliyGaliy

Do they exist though? Running watchman watch-del-all may help in such occasions, to clear watcher cache and re-crawl files

thymikee avatar Apr 06 '20 10:04 thymikee

watchman watch-del-all - didnt solve my problem. In console I have Screen Shot 2020-04-06 at 1 40 43 PM

VitaliyGaliy avatar Apr 06 '20 10:04 VitaliyGaliy

@Esemesek --reset-cache didn't resolve the issue for me. And this issue started after accidentally running npm audit fix.

According to a friend who has done React Native development couple of years, this might be caused to due to React Native core not being upgraded properly.

mmafrar avatar Apr 07 '20 13:04 mmafrar

I also have the issue. Even starting from scratch with npx react-native init test It happens on physical and emulated devices. Flipper and react-devtools work fine.

I have the same message Unable to resolve module ./debugger-ui/debuggerWorker.d9da4ed7.js from ``:

But the file does exist in node_modules\@react-native-community\cli-debugger-ui\build\ui and http://localhost:8081/debugger-ui/debuggerWorker.d9da4ed7.js displays the file With React Native version 0.61.5 i don't have issues

boulgom avatar Apr 07 '20 15:04 boulgom

@boulgom I also experienced the same issue as you have explained above and decided to revert back from 0.62.0 to 0.61.5 since everything was working fine earlier.

mmafrar avatar Apr 07 '20 17:04 mmafrar

I'm experiencing a similar issue after upgrading from react-native 0.61.5 to 0.62.2

Error: Unable to resolve module `./debugger-ui/debuggerWorker.cff11639` from ``:

It's reproducible in an existing project and a new project from template, but it only occurs on a physical device. In the simulator, debug mode works fine. Even with one packager instance running, the simulator will behave correctly and the physical device experiences the issue.

watchman watch-del-all && npm start -- --reset-cache and removing package-lock.json and yarn.lock have not made a difference.

jessecureton avatar Apr 12 '20 21:04 jessecureton

@jessecureton if the app was already installed on the device before making the change, have you tried deleting it and installing it again with the latest changes?

mmafrar avatar Apr 13 '20 01:04 mmafrar