error MSB8020: The build tools for v120 (Platform Toolset = 'v120') cannot be found. To build using

18 篇文章 1 订阅

error MSB8020: The build tools for v120 (Platform Toolset = ‘v120’) cannot be found. To build using the v120 build tools, please install v120 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting “Retarget solution”. [E:\aPritice\JieDe\app\node_modules\buffertools\build\buffertools.vcxproj]

最开始我执行了npm install -g windows-build-tools,然而不起作用还是一样的报错
通过卸载Visual Studio
并安装2017直接下载visual statiu 15 2017 C++工具地址https://download.visualstudio.microsoft.com/download/pr/11503713/e64d79b40219aea618ce2fe10ebd5f0d/vs_BuildTools.exe
然后我去c盘下他说的文件夹,c盘
手动复制14,粘贴12.0,然而不起作用
后来执行代码,

set GYP_MSVS_VERSION=2015
npm install --msvs_version=2015npm install报错编译也是
在全局删除又下载了npm install node-gyp --globe,之前总报这个问题node-gyp的事,所以删除重装了
需要编译,因为用到了sqlite3,原生的库是需要编译的
尝试npm install electron-rebuild在执行“ ./node_modules/.bin/electron-rebuild” 之前发出“ ”
当执行完,还是不行,编译是成功进行了的,但是运行报错

新的问题
看网上有人这么做,操作一把,成功./node_modules/.bin/electron-rebuild -w keytar -p -f

参考:
https://github.com/atom/node-keytar/issues/51
https://github.com/nodejs/node-gyp/issues/679
https://stackoverflow.com/questions/32556295/npm-install-error-the-build-tools-for-v120-platform-toolset-v120-cannot
https://github.com/HDF-NI/hdf5.node/issues/98
https://github.com/nodegit/nodegit/issues/1034

不知道能否帮到别人,先记录下,以后有需要了看

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值