react-native: Cannot find module 'C:\Users\USER\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js

Immediately after updating node i got an error of npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node@8.16.1 preinstall: node installArchSpecificPackage npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node@8.16.1 preinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\USER\AppData\Roaming\npm-cache_logs\2019-09-25T17_14_47_778Z-debug.log

Someone on stackover flow suggested to me to remove the folder of Node_module…now I’m getting two errors module not found and that i posted above

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 34

Most upvoted comments

Hey guys,

npm install -g expo-cli --force

Works for me.

I found the solution just run it in your user folder because it does not respond when you ran it in a different directory other than maybe C:\Users\User_Name

** I still have the error **

```Amoory@S MINGW64 ~/Desktop
$ expo init my-new-project
internal/modules/cjs/loader.js:797
throw err;
^

Error: Cannot find module 'C:\Users\Amoory\AppData\Roaming\npm\node_modules\expo- 
cli\bin\expo.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
   requireStack: []

}```

update node to the latest LTS version as the documentation suggests. you can download that from https://nodejs.org/en/download/

nodejs 8 is not supported

Hello, npm install -g expo-cli --force

works for me too…

Thank you

none of the above answers works for me 😦

update node to the latest LTS version as the documentation suggests. you can download that from https://nodejs.org/en/download/

Thanks. This helped. Encountered the same problem

Hey guys, npm install -g expo-cli --force Thanks for solution, it works for me but if it doesn’t work for anyone in here, try to type expo start instead of yarn or npm start. Also this worked for me too.

Thanks!

none of the above answers works for me 😦

same …please help me if you find solution

npm install -g react-native-cli --force with that i achieved run my app when i had this problem.

hello npm install -g expo-cli --force it works thanks

Hey guys,

npm install -g expo-cli --force

Works for me.

Works for me as well

npm install -g expo-cli --force

Works for me. too

tks @lucashdp