看了网上很多教程,说是windows-build-tools安装脚本的一个BUG。解决办法是在%temp%文件夹找到最新的以dd_installer_开头的日志文件,确保有Closing the installer with exit code 0的输出,确保有vs(visual studio build tools)环境,然后新建dd_client_.log,编辑一行Closing installer. Return code: 3010就能直接安装的。但是不适用于笔者的情况:
- dd_installer_开头的日志文件不能确保输出Closing the installer with exit code 0,或者说没有Closing the installer with exit code 0
- 不能确保visual studio build tools环境,或者说没有这个环境
直接两步:
- npm install -g yarn
- yarn add windows-build-tools