I am new to Expo and having an issue I cannot resolve.
I’ve done some research and tried several fixes but none have worked(deleted node_modules folder, package-lock.json, updated expo to the latest version, tried expo start -c) but nothing has solved it.
The error I get is the following:
Unable to resolve “./internal/defaultConfiguration” from “node_modules@react-native-community\netinfo\src\index.ts”
I had the latest version of netinfo(5.7.0) and downgraded to “@react-native-community/netinfo”: “^4.6.0” as I was getting a different error. Once I did, I got this error and no matter what I did, it did not change.
Here’s a screenshot of the error on the mobile device I use to test the app:
i suspect no because i can see that you are using "^4.6.0" but the version should be “4.6.0” which is potentially an important distinction (learn more about semver at https://semver.npmjs.com/.
Initially I did install it with expo install @react-native-community/netinfo , I then edited the package.json file, simply changed the version of netinfo fro 5.7.0 to 4.6.0 and ran npm install.
When I run npm list @react-native-community/netinfo I get “-- @react-native-community/netinfo@4.6.0”
I double checked to make sure I am not missing any dependencies, closed the debugger, nothing changed, I get the same error on my device(Android) and on Android Studio emulator.
The only thing I have not tried is to start over with a fresh project, I would very much want to avoid that but if I have no other choice, then I guess I will.
Initially I did install it with expo install @react-native-community/netinfo , I then edited the package.json file, simply changed the version of netinfo fro 5.7.0 to 4.6.0 and ran npm install.
interesting that you did indeed have the debugger open. you can open the development menu in the app by dismissing that red screen error and shaking your device or pressing the menu button, then disable debugging js from there
I am currently learning web development, I honestly do not know either how I ended up with version 5.7.0 . The course content stated “run expo install @react-native-community/netinfo” and I did, that was the result.
Thank you for taking the time to explain, very helpful!
For referrence: I had the same issue (and also some others) after trying to manually upgrade some packages. Using expo upgrade to get to sdk37 with correct dependencies solved all such issues for me.