简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM