EXPO: Unable to resolve module ‘./debugger

前端 未结 12 1735
猫巷女王i
猫巷女王i 2021-02-05 02:15

After a reload my app has stopped loading.

I have tried on both emulators and 2 real devives, android and ios.

The error is:

Error: Unabl

相关标签:
12条回答
  • 2021-02-05 02:47

    This can also be caused if you install a dependency, but forget to install other dependencies needed for that dependency. For example, I installed react-native-push-notification, but forgot to install PushNotificationIOS, and I got an identical error.

    0 讨论(0)
  • 2021-02-05 02:48

    In case anyone is still struggling with this, I tried all of the above without success as well as some suggestions from the GitHub page.

    What worked for me was updating the Expo CLI, I was on v38 and updated to 40, updating it fixed the problem.

    npm install -g expo-cli
    

    Edit: Spoke too soon. It fixed it, then a couple of hours later it was broken again.

    0 讨论(0)
  • 2021-02-05 02:49

    Solved it for me in two ways:

    First I simply removed the sourceMappingURL from the mentioned files, as these seemed to raise the error (build problems?).

    But as I had to redo this on any package update / addition (which got quite annoying, as you might have guessed ; ), I was quite happy that @react-native-community/cli-debugger-ui v4.7.0 has been released yesterday! So I quickly added the following to my package.json:

    "resolutions": {
        "@react-native-community/cli-debugger-ui": "4.7.0"
      }
    

    Now, after deleting yarn.lock, running npx react-native-clean-project (the same could have been accomplished by deleting node_modules, cleaning the individual builds & pods, but react-native-clean-project is so much neater % ) & running yarn again, the problem was gone.

    (Be sure to remove the resolution, when RN updates again...)

    Reference: https://github.com/react-native-community/cli/issues/1081#issuecomment-614223917

    0 讨论(0)
  • 2021-02-05 02:51

    I have also the same probleme this is whath I did

    You have two way

    try running npm start -- --reset-cache so that the bundler is cache is reset

    or click reload from the chrome debugger window, which reloads the app in debugger mode on the simulator for you

    0 讨论(0)
  • 2021-02-05 02:53

    I resovled this error by removing node modules + yarn.lock in project

    0 讨论(0)
  • 2021-02-05 02:56

    I just had the same issue and I tried all the answer above, for some strange reasons none worked for me. But here is what worked for me. - Delete the package-lock.json and/or yarn-lock.json - run npm i

    it worked like magic. it worked for me, it might not work for you but at least give it try. #cheers

    0 讨论(0)
提交回复
热议问题