EXPO: Can't find './debugger' module

Issue

After reloading my app, it has stopped loading on both emulators and two real devices (Android and iOS). Occasionally, I receive the error ‘unable to locate instance’.

I have attempted the following actions to resolve the issue:

  1. Clear watchman watches: watchman watch-del-all
  2. Delete the node_modules folder: rm -rf node_modules && npm install
  3. Reset Metro Bundler cache: rm -rf /tmp/metro-bundler-cache-* or npm start -- --reset-cache
  4. Remove haste cache: rm -rf /tmp/haste-map-react-native-packager-*
  5. Restart the computer

The full error is:

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

None of these files exist:
  * debugger-ui/debuggerWorker.d9da4ed7(.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.d9da4ed7/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/serdarmustafa/task_location_namespace/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)
    at ResolutionRequest.resolveDependency (/Users/serdarmustafa/task_location_namespace/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (/Users/serdarmustafa/task_location_namespace/node_modules/metro/src/node-haste/DependencyGraph.js:282:16)
    at /Users/serdarmustafa/task_location_namespace/node_modules/metro/src/lib/transformHelpers.js:267:42
    at /Users/serdarmustafa/task_location_namespace/node_modules/metro/src/Server.js:1305:37
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/serdarmustafa/task_location_namespace/node_modules/metro/src/Server.js:99:24)
    at _next (/Users/serdarmustafa/task_location_namespace/node_modules/metro/src/Server.js:119:9)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)

Expo CLI environment info:

Expo CLI 3.11.3 environment info:
        System:
          OS: macOS 10.15.2
          Shell: 5.7.1 - /bin/zsh
        Binaries:
          Node: 12.8.0 - ~/.nvm/versions/node/v12.8.0/bin/node
          Yarn: 1.19.1 - /usr/local/bin/yarn
          npm: 6.13.4 - ~/.nvm/versions/node/v12.8.0/bin/npm
          Watchman: 4.9.0 - /usr/local/bin/watchman
        IDEs:
          Android Studio: 3.5 AI-191.8026.42.35.5791312
          Xcode: 11.2/11B41 - /usr/bin/xcodebuild
        npmPackages:
          expo: ~36.0.0 => 36.0.2
          react: ~16.9.0 => 16.9.0
          react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4
          react-navigation: ^4.0.10 => 4.0.10
        npmGlobalPackages:
          expo-cli: 3.11.3

Are there any other suggestions on resolving this issue?

One possible solution to this issue is to clear the cache of the package manager (either yarn or npm) and then reinstall the packages. To do this, run the following commands:

For yarn:

yarn cache clean
yarn install

For npm:

npm cache clean --force
npm install

After running these commands, try reloading your app again and see if the issue persists.