npm install时出现 Error: Command failed: C:\Windows\system32\cmd.exe /s /c ......

4,671 阅读1分钟

window环境下,vue 安装环境执行npm install 报错,报错信息Error: Command failed: C:\Windows\system32\cmd.exe /s /c "./configure --with-system-zlib --prefix=",一般是因为在下载依赖环境的时候无权限访问本地磁盘造成的。 解决方式,以管理员身份运行cmd,找到代码位置,然后执行npm install --global --production windows-build-tools命令