Error npm install -g expo-cli

Install Expo CLI

We recommend installing Expo CLI globally, you can do this by running the following command:

npm install -g expo-cli

npm ERR! code EEXIST
npm ERR! path C:\Users\Bulcao\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js
npm ERR! dest C:\Users\Bulcao\AppData\Roaming\npm\expo
npm ERR! EEXIST: file already exists, cmd shim ‘C:\Users\Bulcao\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js’ → ‘C:\Users\Bulcao\AppData\Roaming\npm\expo’
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Bulcao\AppData\Roaming\npm-cache_logs\2020-03-31T19_01_19_416Z-debug.log
PS C:\Users\Bulcao\AppData\Roaming\npm\node_modules> expo init mobile
internal/modules/cjs/loader.js:979
throw err;
^

Error: Cannot find module ‘C:\Users\Bulcao\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
at Function.Module._load (internal/modules/cjs/loader.js:859:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: ‘MODULE_NOT_FOUND’,
requireStack:

restart your computer and try again maybe? windows :thinking:

I cleared the cache (npm cache clean --force) and rebooted the computer, re-installed and the same error occurred.

Bonjour,

J’ai eu le même problème que vous. Sur mon terminal, voici l’erreur qui s’affiche:
npm ERR! code EEXIST
npm ERR! path C:\Users.…
npm ERR! dest C:\Users.…

J’ai pu résoudre ce problème en suivant ces étapes:
1- Il faut supprimer ces deux dossier : npm et npm-cache. ces deux dossiers se
trouvent dans les chemins suivants:
C:\Users\xxx\AppData\Roaming\npm ,
C:\Users\xxx\AppData\Roaming\npm-cache
2- Après avoir supprimer les deux dossiers précédents, taper cette commande sur votre terminal: ```npm install -g npm@latest

De cette façon, j'ai pu résoudre le problème.  Pour info, j'utilise WINDOWS

J’espère que ma réponse vous apportera une solution. 

Bon vent  ^.^
1 Like

Thank`s so much, ist working.

I deleted two files C:\Users\xxx\AppData\Roaming\ (npm and npm-cache) and reinstall o npm again (npm install -g npm)
After reinstalling npm, installing the Expo again ( npm install -g expo-cli ).

2 Likes

Thanks for the response. Worked for me too

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.