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

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

Windows安装cnpm报错 The operation was rejected by your operating system._第1张图片

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等

Windows安装cnpm报错 The operation was rejected by your operating system._第2张图片

你可能感兴趣的:(nodejs,cnpm,npm)