npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path D:\program files\nodejs\node_global\node_modules\cnpm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules@npmcli
npm ERR! dest D:\program files\nodejs\node_global\node_modules\cnpm\node_modules\npm\node_modules\node-gyp\node_modules@npmcli
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename ‘D:\program files\nodejs\node_global\node_modules\cnpm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules@npmcli’ -> ‘D:\program files\nodejs\node_global\node_modules\cnpm\node_modules\npm\node_modules\node-gyp\node_modules@npmcli’
npm ERR! { [Error: EPERM: operation not permitted, rename ‘D:\program files\nodejs\node_global\node_modules\cnpm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules@npmcli’ -> ‘D:\program files\nodejs\node_global\node_modules\cnpm\node_modules\npm\node_modules\node-gyp\node_modules@npmcli’]
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, rename ‘D:\program files\nodejs\node_global\node_modules\cnpm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules@npmcli’ -> ‘D:\program files\nodejs\node_global\node_modules\cnpm\node_modules\npm\node_modules\node-gyp\node_modules@npmcli’
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’
根据网上说法使用npm cache clean --force 不管用
解决方案
我的是node 14.21.3 npm版本 6.14.18
npm install [email protected] -g