最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
npm install 报错: operation not permitted, rename
时间:2022-11-14 22:08:52 编辑:袖梨 来源:一聚教程网
运行 npm install 命令安装依赖包,在 Mac 上的 Vagrant 装的虚拟机上没问题,在阿里云 CentOS 上也没问题,但是在 Windows 环境同样是 Vagrant 装的环境相同的虚拟机上就是不成功,报错如下:
npm ERR! Error: EPERM: operation not permitted, rename ‘/usr/share/nginx/html/tanteng.me/node_modules/duplexify’ -> ‘/usr/share/nginx/html/tanteng.me/node_modules/.duplexify.DELETE’

operation-permitted
之前遇到过 Windows 上 npm 安装依赖出现 symbol 的错误,解决方法是 sudo npm install –no-bin-links,加后面的参数即可。
列出 Node.js 的安装目录,目录的权限属性如图:

npm-chown
这里执行命令:
sudo chown vagrant:vagrant n node npm
记住还要清除 npm 缓存:
npm cache clean
再次执行 sudo npm install –no-bin-links,Windows 环境下即使是在虚拟机也需要带上后面的参数。
这个时候问题解决。
相关文章
- picacg哔咔网页版入口-嗶咔picacg在线高清观看 03-03
- twitter网页版-twitter官网入口 03-03
- 网易云游戏网页版一键直达-网易云游戏网页版即点即玩 03-03
- 樱花漫画正版入口分享:全彩无删减漫画高清画质不卡顿 03-03
- 歪歪漫画-最新漫画网入口首页 03-03
- jm漫画网页版-最新官方入口是什么 03-03