I'm trying to reinstall expo-cli package globally with the command sudo npm install --g expo-cli note that I try --force

Viewed 2693
bosshoc@MBP-de-BOSS meals-app % sudo npm install -g expo-cli
Password:
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/expo-cli
npm ERR! dest /usr/local/lib/node_modules/.expo-cli-dKBr48UN
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node_modules/expo-cli' -> '/usr/local/lib/node_modules/.expo-cli-dKBr48UN'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/bosshoc/.npm/_logs/2021-02-26T10_26_54_772Z-debug.log
1 Answers

Had the exact same thing happen to me. What worked for me was:

  1. navigating to '/usr/local/lib/node_modules/' (Mac: [cmd]+[shift]+[G])
  2. Show the hidden file (Mac: [cmd]+[shift]+[.]) .expo-cli-dKBr48UN
  3. delete it
  4. Run sudo npm install --global expo-cli
Related