npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\Program Files\nodejs\node_cache\_cacache\tmp\a732229f
npm ERR! errno EPERM
npm ERR! FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/moment: EPERM: operation not per
mitted, open 'C:\Program Files\nodejs\node_cache\_cacache\tmp\a732229f'
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\body.js:162:15
npm ERR! at async Arborist.[nodeFromEdge] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\ar
borist\build-ideal-tree.js:1061:19)
npm ERR! at async Arborist.[buildDepStep] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\ar
borist\build-ideal-tree.js:930:11)
npm ERR! at async Arborist.buildIdealTree (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\ar
borist\build-ideal-tree.js:216:7)
npm ERR! at async Promise.all (index 1)
npm ERR! at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\re
ify.js:149:5)
npm ERR! at async Install.install (C:\Program Files\nodejs\node_modules\npm\lib\install.js:170:5)
npm ERR! FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/moment: EPERM: operation not pe
rmitted, open 'C:\Program Files\nodejs\node_cache\_cacache\tmp\a732229f'
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\body.js:162:15
npm ERR! at async Arborist.[nodeFromEdge] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\ar
borist\build-ideal-tree.js:1061:19)
npm ERR! at async Arborist.[buildDepStep] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\ar
borist\build-ideal-tree.js:930:11)
npm ERR! at async Arborist.buildIdealTree (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\ar
borist\build-ideal-tree.js:216:7)
npm ERR! at async Promise.all (index 1)
npm ERR! at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\re
ify.js:149:5)
npm ERR! at async Install.install (C:\Program Files\nodejs\node_modules\npm\lib\install.js:170:5) {
npm ERR! code: 'EPERM',
npm ERR! errno: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\a732229f',
npm ERR! type: 'system',
npm ERR! requiredBy: '.'
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
原因: 终端没有用管理员身份运行
解决: 打开cmd(命令指示符)窗口,用管理员身份打开