3

node gyp rebuild command failed 是什么问题

 2 years ago
source link: https://www.v2ex.com/t/822772
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Node.js

node gyp rebuild command failed 是什么问题

  wiselyv2 · 6 小时 15 分钟前 · 241 次点击

从 github 上 down 下来的一个项目,在 ubuntu 上面可以编译成功,但是在 win10 上就一直编译错误,项目所需的环境都配置了,

  • nodejs 16.13.1
  • visual studio 2019 build tools
  • win builds(mingw)

都安装了,还是不行,我觉得是 node 这边的错误,本人对 node 七窍通了六窍,现在去学也来不及了,所以特地求助,

编译错误如下(执行 yarn install)后的输出,只能将希望寄托于这里的大神了。

error D:\Eth miner\Ironfish_miner\miner2\ironfish\node_modules\segfault-handler: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: D:\Eth miner\Ironfish_miner\miner2\ironfish\node_modules\segfault-handler
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.10.1 found at "C:\Python310\python.exe"
gyp info find VS using VS2019 (16.11.32002.261) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp info find VS run with --verbose for detailed information
(node:16988) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn C:\Python310\python.exe
gyp info spawn args [
gyp info spawn args   'D:\\Eth miner\\Ironfish_miner\\miner2\\ironfish\\node_modules\\@npmcli\\run-script\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\Eth miner\\Ironfish_miner\\miner2\\ironfish\\node_modules\\segfault-handler\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\Eth miner\\Ironfish_miner\\miner2\\ironfish\\node_modules\\@npmcli\\run-script\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\herominer\\AppData\\Local\\node-gyp\\Cache\\16.13.1\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\herominer\\AppData\\Local\\node-gyp\\Cache\\16.13.1',
gyp info spawn args   '-Dnode_gyp_dir=D:\\Eth miner\\Ironfish_miner\\miner2\\ironfish\\node_modules\\@npmcli\\run-script\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\herominer\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.13.1\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=D:\\Eth miner\\Ironfish_miner\\miner2\\ironfish\\node_modules\\segfault-handler',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'D:\\Eth miner\\Ironfish_miner\\miner2\\ironfish\\node_modules\\segfault-handler\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args   'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“-m”开关。
  segfault-handler.cpp
D:\Eth miner\Ironfish_miner\miner2\ironfish\node_modules\nan\nan.h(58,10): fatal error C1083: 无法打开包括文件: “node.h”: No such file or directory [D:\Eth miner\Ironfish_miner\miner2\ironfish\node_modules\segfault-handler\build\segfault-handler.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\Eth miner\Ironfish_miner\miner2\ironfish\node_modules\@npmcli\run-script\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Eth miner\\Ironfish_miner\\miner2\\ironfish\\node_modules\\@npmcli\\run-script\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Eth miner\Ironfish_miner\miner2\ironfish\node_modules\segfault-handler

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK