本文介绍了我正在尝试使用命令 sudo npm install --g expo-cli 全局重新安装 expo-cli 包 注意我尝试 --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:
- 导航到
/usr/local/lib/node_modules/
"(Mac:[cmd]+[shift]+[G]) - 显示隐藏文件(Mac:[cmd]+[shift]+[.])
.expo-cli-dKBr48UN
- 删除它
- 运行
sudo npm install --global expo-cli
- navigating to '
/usr/local/lib/node_modules/
' (Mac: [cmd]+[shift]+[G]) - Show the hidden file (Mac: [cmd]+[shift]+[.])
.expo-cli-dKBr48UN
- delete it
- Run
sudo npm install --global expo-cli
这篇关于我正在尝试使用命令 sudo npm install --g expo-cli 全局重新安装 expo-cli 包 注意我尝试 --force的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!