Unable to find module for DevMenu

Ran expo init and selected typescript with tabs.

> cd my-app
> yarn start

QR code appears in terminal

> i

Similarly, it built fine the first time. Command-R to refresh, and same errors. However, this time I get more output in terminal:

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

None of these files exist:
  * debugger-ui/debuggerWorker.aca173c4.js(.native|.native.expo.ts|.expo.ts|.native.expo.tsx|.expo.tsx|.native.expo.js|.expo.js|.native.expo.jsx|.expo.jsx|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.json|.json|.native.wasm|.wasm)
  * debugger-ui/debuggerWorker.aca173c4.js/index(.native|.native.expo.ts|.expo.ts|.native.expo.tsx|.expo.tsx|.native.expo.js|.expo.js|.native.expo.jsx|.expo.jsx|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.json|.json|.native.wasm|.wasm)
    at ModuleResolver.resolveDependency (/Users/snip/my-app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)
    at ResolutionRequest.resolveDependency (/Users/snip/my-app/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (/Users/snip/my-app/node_modules/metro/src/node-haste/DependencyGraph.js:287:16)
    at /Users/snip/my-app/node_modules/metro/src/lib/transformHelpers.js:267:42
    at Server.<anonymous> (/Users/snip/my-app/node_modules/metro/src/Server.js:841:41)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/snip/my-app/node_modules/metro/src/Server.js:99:24)
    at _next (/Users/snip/my-app/node_modules/metro/src/Server.js:119:9)
Error: Unable to resolve module `./debugger-ui/debuggerWorker.aca173c4.js` from ``:

None of these files exist:
  * debugger-ui/debuggerWorker.aca173c4.js(.native|.native.expo.ts|.expo.ts|.native.expo.tsx|.expo.tsx|.native.expo.js|.expo.js|.native.expo.jsx|.expo.jsx|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.json|.json|.native.wasm|.wasm)
  * debugger-ui/debuggerWorker.aca173c4.js/index(.native|.native.expo.ts|.expo.ts|.native.expo.tsx|.expo.tsx|.native.expo.js|.expo.js|.native.expo.jsx|.expo.jsx|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.json|.json|.native.wasm|.wasm)
    at ModuleResolver.resolveDependency (/Users/snip/my-app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)
    at ResolutionRequest.resolveDependency (/Users/snip/my-app/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (/Users/snip/my-app/node_modules/metro/src/node-haste/DependencyGraph.js:287:16)
    at /Users/snip/my-app/node_modules/metro/src/lib/transformHelpers.js:267:42
    at Server.<anonymous> (/Users/snip/my-app/node_modules/metro/src/Server.js:841:41)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/snip/my-app/node_modules/metro/src/Server.js:99:24)
    at _next (/Users/snip/my-app/node_modules/metro/src/Server.js:119:9)

edit: quick aside, I’m always amazed when I can not only use these tools that others have built, but that someone would take their time to look at my specific troubles to help resolve them just blows my mind. I’m sure its often massively under-appreciated, so for what it’s worth, thank you. Sincerely.

Just wanted to follow up to see if there’s anything else you’d recommend trying - not having a debugger is really slowing things down. Thanks!

hi there,

there are a bunch issues on this topic on the react-native repository. we helped on a fix and it was deployed to a more recent version of react-native-cli, you could try updating. (instructions: GitHub - react-native-community/cli: React Native command line tools)

this should have fixed it: fix: disable caching of assets for the development server by satya164 · Pull Request #1307 · react-native-community/cli · GitHub

some users are still reporting problems. it’s not clear to me that they actually upgraded the react-native-cli properly though.

here is a megathread on the topic: https://github.com/facebook/react-native/issues/28844

Many thanks. I had assumed the react-native-cli wasn’t relevant since I’m using expo-cli.

What (so far) seems to have solved it is the last suggestion in the mega-thread, suggesting to disable cache in the chrome devtools. I’ll try re-enabling the react-native-debugger app tomorrow to see if that works now too.

there is some overlap - react-native is very tightly coupled to react-native-cli currently, so we have to use some pieces of react-native-cli still. eg: this debugging code.

Hmm, so no luck with RN Debugger yet. I disabled cache in the devtools, and completely removed Module resolver from my project. Deleted node modules and ran yarn, then:

❯ yarn list --pattern @react-native-community/cli
yarn list v1.22.10
├─ @react-native-community/cli-debugger-ui@4.13.1
├─ @react-native-community/cli-hermes@4.13.0
├─ @react-native-community/cli-platform-android@4.13.0
├─ @react-native-community/cli-platform-ios@4.13.0
├─ @react-native-community/cli-server-api@4.13.1
├─ @react-native-community/cli-tools@4.13.0
├─ @react-native-community/cli-types@4.10.1
└─ @react-native-community/cli@4.13.1

Still getting:

Runtime is not ready for debugging.
 - Make sure Packager server is running.
- Make sure the JavaScript Debugger is running and not paused on a breakpoint or exception and try reloading again.

ABI40_0_0RCTFatal

-[ABI40_0_0RCTWebSocketExecutor setUp]

ABI40_0_0facebook::ABI40_0_0React::ABI40_0_0RCTObjcExecutorFactory::createJSExecutor(std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::ExecutorDelegate>, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::MessageQueueThread>)
(anonymous namespace)::GetDescAdapter::createJSExecutor(std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::ExecutorDelegate>, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::MessageQueueThread>)
ABI40_0_0facebook::ABI40_0_0React::NativeToJsBridge::NativeToJsBridge(ABI40_0_0facebook::ABI40_0_0React::JSExecutorFactory*, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::ModuleRegistry>, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::MessageQueueThread>, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::InstanceCallback>)
std::__1::__function::__func<ABI40_0_0facebook::ABI40_0_0React::Instance::initializeBridge(std::__1::unique_ptr<ABI40_0_0facebook::ABI40_0_0React::InstanceCallback, std::__1::default_delete<ABI40_0_0facebook::ABI40_0_0React::InstanceCallback> >, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::JSExecutorFactory>, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::MessageQueueThread>, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::ModuleRegistry>)::$_0, std::__1::allocator<ABI40_0_0facebook::ABI40_0_0React::Instance::initializeBridge(std::__1::unique_ptr<ABI40_0_0facebook::ABI40_0_0React::InstanceCallback, std::__1::default_delete<ABI40_0_0facebook::ABI40_0_0React::InstanceCallback> >, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::JSExecutorFactory>, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::MessageQueueThread>, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::ModuleRegistry>)::$_0>, void ()>::operator()()
ABI40_0_0facebook::ABI40_0_0React::tryAndReturnError(std::__1::function<void ()> const&)
ABI40_0_0facebook::ABI40_0_0React::ABI40_0_0RCTMessageThread::tryFunc(std::__1::function<void ()> const&)
ABI40_0_0facebook::ABI40_0_0React::ABI40_0_0RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)
ABI40_0_0facebook::ABI40_0_0React::Instance::initializeBridge(std::__1::unique_ptr<ABI40_0_0facebook::ABI40_0_0React::InstanceCallback, std::__1::default_delete<ABI40_0_0facebook::ABI40_0_0React::InstanceCallback> >, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::JSExecutorFactory>, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::MessageQueueThread>, std::__1::shared_ptr<ABI40_0_0facebook::ABI40_0_0React::ModuleRegistry>)
-[ABI40_0_0RCTCxxBridge _initializeBridgeLocked:]
-[ABI40_0_0RCTCxxBridge _initializeBridge:]
__30-[ABI40_0_0RCTCxxBridge start]_block_invoke.83
ABI40_0_0facebook::ABI40_0_0React::tryAndReturnError(std::__1::function<void ()> const&)
-[ABI40_0_0RCTCxxBridge _tryAndHandleError:]
__NSThreadPerformPerform
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
__CFRunLoopDoSource0
__CFRunLoopDoSources0
__CFRunLoopRun
CFRunLoopRunSpecific
+[ABI40_0_0RCTCxxBridge runRunLoop]
__NSThread__start__
_pthread_start
thread_start

Edit: The CLI just shows:


Opening on iOS...
Opening the iOS simulator, this might take a moment.
Opening exp://127.0.0.1:19000 on iPhone 12 Pro

Press ? to show a list of all available commands.
info Starting custom debugger by executing:, unset ELECTRON_RUN_AS_NODE && open -g 'rndebugger://set-debugger-loc?port=19001' || "/Users/username/git/project_folder"
Finished building JavaScript bundle in 40952ms.

And RN Debugger is “Waiting for React To Connect”

Update: Also tried clearing content and settings on iOS simulator, clearing NPM cache, toggling devtools off and on, switching from LAN to local mode in metro, etc. Now at the point where I believe I’ve tried everything listed in every linked thread.

For anyone having this issue on ejected projects when upgrading to SDK 40 (from 37 in my case). I finally found out how to resolve this.

When using expo upgrade, the package.json changes the react-native import to:

    "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",

However, new project projects (ejected from expo) use:

    "react-native": "~0.63.4",

so doing yarn add react-native@~0.63.4 then cd ios && pod install should resolve the issue.

This fixed it for me.

2 Likes

Switching back to "react-native": "~0.63.4" fixed it for me too. Thx!