gpt4 book ai didi

node-gyp - 在 Windows 中安装 node-argon2

转载 作者:行者123 更新时间:2023-12-03 09:39:54 30 4
gpt4 key购买 nike

小背景
我正在尝试安装 node-argon2但是安装有问题。我一直在尝试下载 GCC,我已经安装了 node-gypdocs说过。

但是我在这一步上一直失败..

CXX=g++-6 npm install argon2

我不知道那个函数做了什么,当我试图在我的终端中启动它时出现了这个。
> argon2@0.21.0 install C:\Users\BizCon\Projects\express-ticket\node_modules\argon2
> node-gyp rebuild


C:\Users\BizCon\Projects\express-ticket\node_modules\argon2>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\BizCon\Projects\express-ticket\node_modules\argon2\build\libargon2.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
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"
gyp ERR! cwd C:\Users\BizCon\Projects\express-ticket\node_modules\argon2
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN babel-loader@8.0.5 requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN babel-loader@8.0.5 requires a peer of webpack@>=2 but none is installed. You must install peer dependencies yourself.
npm WARN express-server@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! argon2@0.21.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the argon2@0.21.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

最佳答案

我问这个的时候太粗心了。我希望无论你是谁去这个论坛已经完成了node-gyp存储库 小心。

你看这是Installation Guide of node-gyp for Windows

有两种选择。 只用第一个!

Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production
windows-build-tools
from an elevated PowerShell or CMD.exe (run as Administrator).



是的,这个 npm install --global --production windows-build-tools
我当时太菜了,我把它读为' npm install --global--production windows-build-tools '。还有哇!我可以用 node-argon2现在。哈哈哈哈哈哈哈。

关于node-gyp - 在 Windows 中安装 node-argon2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55197623/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com