我正在使用
npm i -g @vue/cli
在我的系统中安装 Vue.js,但发生了这种情况:
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\pc\\AppData\\Roaming\\npm\\node_modules\\@vue\\cli\\node_modules',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\pc\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\apollo-server-core'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\pc\\AppData\\Roaming\\npm\\node_modules\\@vue\\cli\\node_modules\\apollo-server-core'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\pc\\AppData\\Roaming\\npm\\node_modules\\@vue\\cli',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\pc\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\bl\node_modules\readable-stream\lib'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\pc\\AppData\\Roaming\\npm\\node_modules\\@vue\\cli\\node_modules\\bl\\node_modules\\readable-stream\\lib'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\pc\\AppData\\Roaming\\npm\\node_modules\\@vue\\cli',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\pc\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\node-notifier'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\pc\\AppData\\Roaming\\npm\\node_modules\\@vue\\cli\\node_modules\\node-notifier'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code EEXIST
npm ERR! path C:\Users\pc\AppData\Roaming\npm\vue.cmd
npm ERR! EEXIST: file already exists
npm ERR! File exists: C:\Users\pc\AppData\Roaming\npm\vue.cmd
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in: C:\Users\pc\AppData\Local\npm-cache\_logs\2023-10-11T13_06_03_205Z-debug-0.log
我对 Vue.js 非常陌生,只在 React 和 NextJs 中工作过。有了解的人可以帮我解决这个问题吗?
要全局安装软件包(
-g
选项),您可能需要以管理员身份运行命令提示符/PowerShell。
作为一般规则和出于安全原因,请小心全局安装的软件包:仅安装您信任的软件包。