背景

在执行:npm install 时,安装完一些依赖包之后提示:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1

解决

先用管理员打开cmd

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1

1.输入:

npm install -g node-gyp

2.再输入:

npm install --global --production windows-build-tools

注意:

第二个执行命令会比较长

一开始执行界面

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1

不要认为此时已经执行完毕,等待出现以下界面

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1

可以看到All done 提示 ,用时还是比较长的。

相关文章:

  • 2021-07-23
  • 2021-11-23
  • 2021-11-21
  • 2022-12-23
猜你喜欢
  • 2021-06-18
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
  • 2021-10-10
  • 2021-10-06
相关资源
相似解决方案