Windows安装cnpm报错 The operation was rejected by your operating system.

发布时间:2023年12月23日

Windows在安装cnpm时出现如下错误

在这里插入图片描述

npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

网上的方法都试过了,不可用,我安装的nodejs版本是v14.21.3,直接执行npm i -g cnpm会出现如上错误,可尝试降低安装版本

npm i -g cnpm@8目前最新版本是9.x,尝试安装npm 8.x版本,如果不行继续降@7 @6等

在这里插入图片描述

文章来源:https://blog.csdn.net/weixin_43515759/article/details/135174535
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。