简体   繁体   English

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

[英]Why this truffle installation error coming

I'm trying to install truffle from 2 days I don't know why error is coming in the same way I install truffle in my computer but in my laptopp when I'm trying it is showing an error I install Python 3.10 then visual studio build tools also but now I don't know why this error appears.我正在尝试从 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>

I was facing exact same issue on node version 16 and got if finally resolved after I installed node -v v14.18.1 instead我在节点版本 16 上遇到了完全相同的问题,如果在我安装 node -v v14.18.1后终于解决了

I was also facing the same problem...我也面临同样的问题...

Solution:解决方案:

  1. Run as administrator以管理员身份运行

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

  3. npm install -g truffle

I had the same problem.我有同样的问题。

You need to install the latest version of node, npm and python.您需要安装最新版本的节点 npm 和 python。 The warnings will continue to appear but the installation of truffle will be successful.警告将继续出现,但松露的安装将成功。

It worked for me with the folowing versions:它适用于以下版本:

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

Hope you have figured this out since it was over 2 weeks ago.希望你在两周前就已经弄清楚了。

I had the same issue.我遇到过同样的问题。 However I had a feeling the whole time is was python related.但是我一直感觉与 python 相关。 I have never coded before watching hashlips and codestackr about a month ago.在大约一个月前观看 hashlips 和 codestackr 之前,我从未编码过。

So zero python experience and the logs you put looked very similar to mine.因此,零 python 经验和您放置的日志看起来与我的非常相似。

How I fixed was I followed the guidelines in the extension section, under the python app, in the first section named details it gives very clear instructions on how to set up python correctly.我如何修复是我遵循扩展部分中的指南,在 python 应用程序下,在名为 details 的第一部分中,它给出了关于如何正确设置 python 的非常清晰的说明。

Start there if you are having this issue.如果您遇到此问题,请从那里开始。

The Real USA MetaBert真正的美国 MetaBert

I also faced the same issue but using version its got resolved我也遇到了同样的问题,但是使用版本解决了

npm install and use use truffle version @5.1.15 //as per your project requirement npm 安装和使用使用松露版本@5.1.15 //根据您的项目要求

Try to clear the cache:尝试清除缓存:

npm cache clean -f

and install again.并再次安装。

I had the same issue.我遇到过同样的问题。 To be clear, you don't need to downgrade the node or npm version.要清楚,您不需要降级节点或 npm 版本。 The error you are facing is because you your system is not able to get the latest visual desktop C++ development.您面临的错误是因为您的系统无法获得最新的可视化桌面 C++ 开发。 For achieving this you need to install visual studio code from here https://visualstudio.microsoft.com/vs/community/ Get the community one since it is free of use.为此,您需要从此处安装 Visual Studio 代码https://visualstudio.microsoft.com/vs/community/获取社区之一,因为它是免费的。 And then install the latest version of desktop development with C++然后安装最新版桌面开发用C++

Cheers.干杯。 This should work.这应该有效。

Download the truffle version 5.0.2 .No need to downgrade your node version.下载truffle 版本 5.0.2 。无需降级您的节点版本。

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

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