When trying to update expo with “npm install -g expo-cli”, I get the following error. If I just ignore updating, all works OK, but I would like to get this sorted.
Error: Cannot find module ‘…/lib/cli.js’
Require stack:
- /usr/local/lib/node_modules/npm/bin/npm-cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:2:1)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
code: ‘MODULE_NOT_FOUND’,
requireStack: [ ‘/usr/local/lib/node_modules/npm/bin/npm-cli.js’ ]
}
From my package.json file:
“expo”: “~39.0.2”,
“expo-status-bar”: “~1.0.2”,
“react”: “16.13.1”,
“react-dom”: “16.13.1”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-39.0.4.tar.gz”,
Developing for IOS and Android, not that it matters with this issue. Running on an iMac with Catalina OS 10.15.7