Windos下安装Truffle报错,如下:
1.执行npm install -g truffle提示报错:

You need to install the latest version of Visual Studio

npm ERR! code 1
npm ERR! path D:\Node\global\npm\node_modules\truffle\node_modules\secp256k1
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.2.0
npm ERR! gyp info using node@16.13.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.7 found at "C:\Users\zws\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version was set from command line or npm config
npm ERR! gyp ERR! find VS - looking for Visual Studio version 2019
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS unknown version "undefined" found at "D:\����\VS"
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS valid versions for msvs_version:
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack     at VisualStudioFinder.fail (D:\Node\global\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack     at D:\Node\global\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (D:\Node\global\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack     at D:\Node\global\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack     at D:\Node\global\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack     at D:\Node\global\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack     at D:\Node\global\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "D:\\软件\\Node\\node.exe" "D:\\Node\\global\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd D:\Node\global\npm\node_modules\truffle\node_modules\secp256k1
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp ERR! not oknpm ERR! A complete log of this run can be found in:
npm ERR!     D:\Node\global\node_cache\_logs\2021-11-02T08_31_59_163Z-debug.log

这时候该怎么办?
第一步,执行:npm install -g node-gyp
第二步:执行npm i -g windows-build-tools
第三步,再次安装,即可成功。

Windos下安装Truffle报错install the latest version of Visual Studio相关推荐

  1. Deepin下安装scrapy报错fatal error: Python.h: 没有那个文件或目录

    Deepin下安装scrapy报错(亲测有效!) 问题描述 在deepin操作系统上,使用python3.6,通过sudo pip3 install scrapy安装时候,出现以下错误: src/tw ...

  2. linux oracle 11g x86,Oracle 11g在Linux6下安装及报错 C [ld-linux-x86-64.so.2+0x14d70]的解决方...

    Oracle 11g在Linux6下安装及报错 C [ld-linux-x86-64.so.2+0x14d70]的解决方法 首页 → 数据库技术 背景: 阅读新闻 Oracle 11g在Linux6下 ...

  3. Windows下安装RabbitMQ报错:unable to perform an operation on node时的解决方案

    Windows下安装RabbitMQ报错:unable to perform an operation on node时的解决方案 参考文章: (1)Windows下安装RabbitMQ报错:unab ...

  4. 【在Windows7旗舰版下安装Anaconda报错failed to create menus】

    安装Anaconda报错failed to create menus 装了N次的Anaconda,第一次出现这种错误,觉得很有意思,于是在网上大概搜索了大家给的处理方法: 安装路径中不能包含中文字符, ...

  5. mysql报错3534_win7下安装MYSQL报错:MYSQL 服务无法启动的3534问题

    上午在win7下安装MYSQL,只到"net start mysql"这一步报错:3534的错误: 于是在百度中搜索关键字"mysql服务无法启动3534". ...

  6. mysql 报错3534_win7下安装MYSQL报错:MYSQL 服务无法启动的3534问题

    win7下安装MYSQL,只到"net start mysql"这一步报错:3534的错误: 是直接官网下载的压缩文件.不是安装文件. 解决方法: 1:环境变量PATH添加完成(例 ...

  7. win7 64下安装mysql-python报错的解决办法

    转自博客园楚狂人阿飞 原文地址:http://www.cnblogs.com/fireflow/p/4598526.html 最近要使用django进行项目开发,需要使用mysql-python模块. ...

  8. ubuntu 下安装labelImg报错

    1.按github上labelImg项目下README安装labelImg时报错如下: (labelImg) xx@xx-Lenovo-Legion-Y8000:~/SW$ labelImg qt.q ...

  9. linner在ruby2.2.2下安装报错failed to build gem native extension,在1.9.2下安装又报错说nio4r说nio4r requires ruby ver

    安装linner时候,先是用的ruby2.2.2安装的,结果就报错说failed to build gem native extension,网上查到http://stackoverflow.com/ ...

  10. ORACLE11G在LINUX6下安装及报错 C [ld-linux-x86-64.so.2+0x14d70]的解决方法

    1.zip/unzip,tar #/*---------------------压缩举例 [root@instructor Share]# pwd /var/Share [root@instructo ...

最新文章

  1. 人工智能:2018年发生了什么变化,2019年又将发生什么变化
  2. JavaScript 原型链学习(二)原型的动态性
  3. python 指定端口读取网站_Python实现局域网指定端口扫描
  4. Eigen入门之密集矩阵 8 - resharp slicing切片
  5. 做论坛签名外链 我们需要注意什么?
  6. 渗透测试入门14之渗透测试工具1
  7. 中科院自动化所王金桥:深耕AI中台引擎,助力AI场景化、多元化落地...
  8. python的作用域分别有几种_Python中作用域的深入讲解
  9. C# internal和public
  10. 最新BT面板静态文件镜像库v7.1.1
  11. 南大周志华、俞扬、钱超最新力作:演化学习:理论与算法进展一书导读
  12. bugzilla mysql_Centos 7 搭建Bugzilla5.0.4
  13. 十大管理之项目干系人管理知识点
  14. shell输出毫秒_Shell获取毫秒时间
  15. 无线网和网吧服务器,网吧网络使用无线局域网的几个优势所在
  16. 当实现两个Activity之间的跳转时,发生 XXX has stoped 或者 XXX keeps stopping
  17. 微信开放平台开发者认证
  18. HTML5Canvas实现简易画图工具(铅笔,直线,矩形,圆,文本框,橡皮擦等)
  19. WPS表格-快速展开全部隐藏行
  20. 编程二大问题—c的常用库函数总结

热门文章

  1. html5页面的dtd定义是,DTD的作用
  2. css怎么修改图片像素,怎么改变图片宽度_word怎么改变图片像素大小
  3. 基于微信小程序的图书馆管理系统设计与实现(论文+程序设计源码+数据库文件)
  4. 凝思系统激活序列号_凝思6.0虚拟机搭建--遇到的问题
  5. python pyd_python pyd 加密相关
  6. 毕业设计网站项目的开发流程
  7. Paddle安装是遇到 Error: Can not import avx core while this file exists:
  8. 使用USB充电的5号电池
  9. 微信登录不上显示白屏_微信授权页面在某些手机上为白屏是怎么回事?
  10. win11窗口桌面管理器突然很吃内存?