node.js 下载完之后,下载cnpm报错
问题如下 operation not permitted The operation was rejected by your operating system It’s possible that the file was already in use (by a text editor or antivirus), or that you lack permissions to access it.
上面的报错信息提示权限不足
如果你还没有把windows文件夹权限改过,那先去试试别人的修改权限的方法
这个是修改权限等其他问题的链接(别人的)
https://blog.csdn.net/mr__sun__/article/details/119140624
修改权限的办法行不通再往下看
这个问题表现是只有cnpm安装报错,其他的包都正常安装
问题原因:node的版本太低,装不上高版本的cnpm,指定对应的cnpm版本就可以安装了
npm install -g cnpm@7.1.0 --registry=http://registry.npmmirror.com
我的npm版本是6.14.8,node版本是14.21.3 。
安装7.1.0的cnpm可以正常安装了 高版本的node不能兼容低版本的node_sass 低版本的node又不能下载高版本的cnpm
tnnd,搞我一天
精彩文章
发表评论