misakimichy
misakimichy

Reputation: 163

Cannot find module 'expo/bundleNativeModules.json'

I'm using expo to build an app. I'm new to React-Native and expo so if you could help me, I'd be really appreciated. I get a couple of warnings that says:

Some of your project's dependencies are not compatible with currently installed expo package version
- expo-constants - expected version range: ...
- expo-permissions - expected version range: ...
- react-native-gesture-handler - expected version range: ...

Your project may not work correctly until you install the correct versions of the packages. 

I was facing another error:

"TypeError: TypeError: undefined is not an object (evaluating '_styles.default.list')".

So I'm trying to install the latest version.

When I try to install expo install expo-permissions and expo install react-native-gesture-handler, I get errors. Both errors say

Cannot find module 'expo/bundledNativeModules.json' Require stack: - /Users/address/src/react-native-udacicards/noop.js

I tried to remove node_modules and package-lock.json then npm install.

Upvotes: 2

Views: 11842

Answers (5)

jgarcias
jgarcias

Reputation: 689

My solution was to do this:

npm install -g expo-cli

Upvotes: 0

I also faced this issue but Enableing USB tethering in phone, and clearing all data in expo app resolved this issue.

Upvotes: 0

riyaolega
riyaolega

Reputation: 131

1.on your package.json change expo version to

  • "expo": "~43.0.2", (or lower) and your react-native-gesture-handler to
  • "react-native-gesture-handler": "~1.10.2", (for expo 43.0.2)
  1. Then, on your terminal (in your project), run
  • npm cache clean --force
  • npm install
  • expo doctor --fix-dependencies

Upvotes: 0

mahmoud mehdi
mahmoud mehdi

Reputation: 1590

I don't know if this solution will work for all the situations, but this is what fixed the issue it for me:

  1. clean the npm cache using the following command : npm cache clean --force
  2. re-install the dependencies : npm install
  3. expo install

I hope it helps

Upvotes: 0

Raj Gohel
Raj Gohel

Reputation: 1102

rollback with npm install -g [email protected]

Upvotes: 1

Related Questions