从 github 上 down 下来的一个项目,在 ubuntu 上面可以编译成功,但是在 win10 上就一直编译错误,项目所需的环境都配置了,
都安装了,还是不行,我觉得是 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
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.