镜像下载错误
来源:1-2 搭建开发环境

王得否9176967
2025-04-10
老师我安装问答区的新镜像报错如下:
C:\Users\32614>npm install -g cnpm --registry=https://registry.npmmirror.com
npm WARN notsup Unsupported engine for cnpm@9.4.0: wanted: {“node”:">= 14.18.0"} (current: {“node”:“12.18.3”,“npm”:“6.14.6”})
npm WARN notsup Not compatible with your version of node/npm: cnpm@9.4.0
npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules.make-fetch-happen.DELETE\node_modules@npmcli
npm ERR! dest C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules\make-fetch-happen\node_modules@npmcli
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename ‘C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules.make-fetch-happen.DELETE\node_modules@npmcli’ -> 'C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules\make-fetch-happen\node_modules@npmcli’
npm ERR! [OperationalError: EPERM: operation not permitted, rename ‘C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules.make-fetch-happen.DELETE\node_modules@npmcli’ -> ‘C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules\make-fetch-happen\node_modules@npmcli’] {
npm ERR! cause: [Error: EPERM: operation not permitted, rename ‘C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules.make-fetch-happen.DELETE\node_modules@npmcli’ -> ‘C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules\make-fetch-happen\node_modules@npmcli’] {
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘rename’,
npm ERR! path: ‘C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules\.make-fetch-happen.DELETE\node_modules\@npmcli’,
npm ERR! dest: 'C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules\make-fetch-happen\node_modules\@npmcli’
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘rename’,
npm ERR! path: ‘C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules\.make-fetch-happen.DELETE\node_modules\@npmcli’,
npm ERR! dest: ‘C:\Users\32614\AppData\Roaming\npm\node_modules\cnpm\node_modules\make-fetch-happen\node_modules\@npmcli’,
npm ERR! parent: 'cnpm’
npm ERR! }
npm ERR!
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.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\32614\AppData\Roaming\npm-cache_logs\2025-04-10T08_11_11_375Z-debug.log
1回答
-
神思者
2025-04-11
可能是你的NodeJS版本太老了吧?
032025-04-11
相似问题