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等