节点 GYP 在安装 Web3 scrypt@6.0.3 安装期间失败:"节点 Gyp 重建"



我正在我的项目中运行npm安装,但中途失败。我已经按照这个指导做了,但我仍然无法让 node-gyp 正常工作。

我已经安装了npm install --global --production windows-build-tools --vs2015并设置了python 2.6和路径,但我仍然无法通过npm安装过程

npm install --verbose这就是我得到的

22 Warning(s)
47 Error(s)
Time Elapsed 00:00:10.17
gyp ERR! build error
gyp ERR! stack Error: `C:Program Files (x86)MSBuild14.0binMSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibbuild.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.17763
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:UsersUSERWebstormProjectsmyAppnode_modulesscrypt
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm verb lifecycle scrypt@6.0.3~install: unsafe-perm in lifecycle true
npm verb lifecycle scrypt@6.0.3~install: PATH: C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;C:UsersUSERWebstormProjectsportal_frontend_au
th0node_modulesscryptnode_modules.bin;C:UsersUSERWebstormProjectsmyAppnode_modules.bin;C:Program Files (x86)MSBuild14.0Bin;C:UsersUSEREnvsproje
ctsScripts;C:UsersUSERWebstormProjectsmyAppnode_modules.bin;C:Python27;C:Python27Scripts;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:Wi
ndowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program Filesnodejs;C:ProgramDatachocolateybin;C:Program FilesGitcmd;C:Program Files (x86)Window
s Kits8.1Windows Performance Toolkit;C:UsersUSERAppDataLocalProgramsPythonPython38-32Scripts;C:UsersUSERAppDataLocalProgramsPythonPython38-32;C:UsersUSERA
ppDataLocalMicrosoftWindowsApps;;C:Program FilesJetBrainsWebStorm 2019.2.4bin;;C:UsersUSERAppDataRoamingnpm
npm verb lifecycle scrypt@6.0.3~install: CWD: C:UsersUSERWebstormProjectsmyAppnode_modulesscrypt
npm info lifecycle scrypt@6.0.3~install: Failed to exec install script
npm timing action:install Completed in 32082ms
npm verb unlock done using C:UsersUSERAppDataRoamingnpm-cache_locksstaging-19dd7fb111b35106.lock for C:UsersUSERWebstormProjectsmyAppnode_modules.st
aging
npm timing stage:rollbackFailedOptional Completed in 511ms
npm timing stage:runTopLevelLifecycles Completed in 47161ms
npm WARN @typescript-eslint/eslint-plugin@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/parser@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modulesjest-haste-mapnode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_moduleschokidarnode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
npm verb stack Error: scrypt@6.0.3 install: `node-gyp rebuild`
npm verb stack Exit status 1
npm verb stack     at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:332:16)
npm verb stack     at EventEmitter.emit (events.js:210:5)
npm verb stack     at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
npm verb stack     at ChildProcess.emit (events.js:210:5)
npm verb stack     at maybeClose (internal/child_process.js:1021:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
npm verb pkgid scrypt@6.0.3
npm verb cwd C:UsersUSERWebstormProjectsmyApp
npm verb Windows_NT 10.0.17763
npm verb argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--verbose"
npm verb node v12.13.1
npm verb npm  v6.12.1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt@6.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
npm timing npm Completed in 48860ms
npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersUSERAppDataRoamingnpm-cache_logs2019-11-23T23_11_00_333Z-debug.log

作者推送了一个修复程序,安装它应该可以解决问题

npm install github:barrysteyn/node-scrypt#fb60a8d3c158fe115a624b5ffa7480f3a24b03fb

最新更新