簡體   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