繁体   English   中英

为什么这个松露安装错误来了

[英]Why this truffle installation error coming

我正在尝试从 2 天开始安装 truffle 我不知道为什么会出现错误,就像我在我的计算机中安装 truffle 但是在我的笔记本电脑中当我尝试它时显示错误我安装 Python 3.10 然后是 Visual Studio构建工具,但现在我不知道为什么会出现这个错误。

dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path C:\Users\HP\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\@trufflesuite\bigint-buffer
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.3.0
npm ERR! gyp info using node@16.13.2 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.2 found at "C:\Python310\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 2015
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2019 (16.11.32106.194) found at:
npm ERR! gyp ERR! find VS "D:\New folder"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v142
npm ERR! gyp ERR! find VS - found Windows SDK: 10.0.19041.0
npm ERR! gyp ERR! find VS - msvs_version does not match this version
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 - "2019"
npm ERR! gyp ERR! find VS - "D:\New folder"
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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack     at C:\Program Files\nodejs\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.10240
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\HP\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\@trufflesuite\bigint-buffer
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v8.3.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Local\npm-cache\_logs\2022-01-27T06_07_10_995Z-debug.log
PS C:\Users\HP\Desktop>

我在节点版本 16 上遇到了完全相同的问题,如果在我安装 node -v v14.18.1后终于解决了

我也面临同样的问题...

解决方案:

  1. 以管理员身份运行

  2. npm install --global windows-build-tools

  3. npm install -g truffle

我有同样的问题。

您需要安装最新版本的节点 npm 和 python。 警告将继续出现,但松露的安装将成功。

它适用于以下版本:

  • 节点 - v16.13.2
  • python - v3.9.10
  • npm - 8.4.1

希望你在两周前就已经弄清楚了。

我遇到过同样的问题。 但是我一直感觉与 python 相关。 在大约一个月前观看 hashlips 和 codestackr 之前,我从未编码过。

因此,零 python 经验和您放置的日志看起来与我的非常相似。

我如何修复是我遵循扩展部分中的指南,在 python 应用程序下,在名为 details 的第一部分中,它给出了关于如何正确设置 python 的非常清晰的说明。

如果您遇到此问题,请从那里开始。

真正的美国 MetaBert

我也遇到了同样的问题,但是使用版本解决了

npm 安装和使用使用松露版本@5.1.15 //根据您的项目要求

尝试清除缓存:

npm cache clean -f

并再次安装。

我遇到过同样的问题。 要清楚,您不需要降级节点或 npm 版本。 您面临的错误是因为您的系统无法获得最新的可视化桌面 C++ 开发。 为此,您需要从此处安装 Visual Studio 代码https://visualstudio.microsoft.com/vs/community/获取社区之一,因为它是免费的。 然后安装最新版桌面开发用C++

干杯。 这应该有效。

下载truffle 版本 5.0.2 。无需降级您的节点版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM