node ygp rebuild command failed是什么原因?

wisely 发布于 2021/12/16 19:23
阅读 214
收藏 0

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

nodejs 16.13.1

Rust

yarn

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 node-gyp@7.1.2
gyp info using node@16.13.1 | 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

加载中
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部
返回顶部
顶部