我已经阅读了 expat 和 gyp github 上的所有自述文件,尝试按照他们告诉我在错误日志中发现的情况(顺便说一下下面)做的事情。我已经python 2.7 installed
并且似乎已经使用 cmd 命令将其正确添加到节点配置中。
我也有它似乎正在识别的 Visual Studio 2019,尝试安装windows-build-tools
2015 和普通版本,但没有任何帮助。
还尝试按照 gyp 自述文件所述安装 VS2012,但似乎它们的链接已断开(安装工具不起作用,即使我选择“互联网下载”选项,也会出现“无法找到包”之类的错误。我没有在 microsoft 网站上没有找到除 2012 可再发行的任何内容。
仍然没有任何效果,所以我决定尝试在这里发布这个问题,即使我已经看到了一些可能与这个主题相关的问题,但仍然没有找到任何有用的答案。如果我只是愚蠢,请提前道歉:|
81 error path C:\Users\username\source\repos\projectname\node_modules\node-expat
82 error command failed
83 error command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
84 error Warning: Missing input files:
84 error C:\Users\username\source\repos\projectname\node_modules\node-expat\build\deps\libexpat\..\..\..\deps\libexpat\version.c
84 error �믮������ ������⥫쭠� ᡮઠ ��⮢ � �⮬ �襭��. �⮡� ������� ��ࠫ������ ᡮ��, ������� ��ࠬ��� "-m".
84 error xmlparse.c
84 error C:\Users\username\source\repos\projectname\node_modules\node-expat\deps\libexpat\lib\xmlparse.c(6,9): warning C4068: �������⭠� �ࠣ�� "GCC" [C:\Users\username\source\repos\projectname\node_modules\node-expat\build\deps\libexpat\expat.vcxproj]
84 error xmltok.c
84 error xmlrole.c
84 error win_delay_load_hook.cc
84 error expat.vcxproj -> C:\Users\username\source\repos\projectname\node_modules\node-expat\build\Release\\libexpat.lib
84 error node-expat.cc
84 error C:\Users\username\AppData\Local\node-gyp\Cache\15.12.0\include\node\node.h(63,10): fatal error C1083: �� 㤠���� ������ 䠩� ����祭��: v8.h: No such file or directory, [C:\Users\username\source\repos\projectname\node_modules\node-expat\build\node_expat.vcxproj]
85 error gyp info it worked if it ends with ok
85 error gyp info using node-gyp@8.1.0
85 error gyp info using node@15.12.0 | win32 | x64
85 error gyp info find Python using Python version 3.9.5 found at "C:\Users\username\AppData\Local\Programs\Python\Python39\python.exe"
85 error gyp info find VS using VS2019 (16.9.31205.134) found at:
85 error gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
85 error gyp info find VS run with --verbose for detailed information
85 error gyp info spawn C:\Users\username\AppData\Local\Programs\Python\Python39\python.exe
85 error gyp info spawn args [
85 error gyp info spawn args 'C:\\Users\\username\\source\\repos\\projectname\\node_modules\\node-gyp\\gyp\\gyp_main.py',
85 error gyp info spawn args 'binding.gyp',
85 error gyp info spawn args '-f',
85 error gyp info spawn args 'msvs',
85 error gyp info spawn args '-I',
85 error gyp info spawn args 'C:\\Users\\username\\source\\repos\\projectname\\node_modules\\node-expat\\build\\config.gypi',
85 error gyp info spawn args '-I',
85 error gyp info spawn args 'C:\\Users\\username\\source\\repos\\projectname\\node_modules\\node-gyp\\addon.gypi',
85 error gyp info spawn args '-I',
85 error gyp info spawn args 'C:\\Users\\username\\AppData\\Local\\node-gyp\\Cache\\15.12.0\\include\\node\\common.gypi',
85 error gyp info spawn args '-Dlibrary=shared_library',
85 error gyp info spawn args '-Dvisibility=default',
85 error gyp info spawn args '-Dnode_root_dir=C:\\Users\\username\\AppData\\Local\\node-gyp\\Cache\\15.12.0',
85 error gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\username\\source\\repos\\projectname\\node_modules\\node-gyp',
85 error gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\username\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\15.12.0\\\\<(target_arch)\\\\node.lib',
85 error gyp info spawn args '-Dmodule_root_dir=C:\\Users\\username\\source\\repos\\projectname\\node_modules\\node-expat',
85 error gyp info spawn args '-Dnode_engine=v8',
85 error gyp info spawn args '--depth=.',
85 error gyp info spawn args '--no-parallel',
85 error gyp info spawn args '--generator-output',
85 error gyp info spawn args 'C:\\Users\\username\\source\\repos\\projectname\\node_modules\\node-expat\\build',
85 error gyp info spawn args '-Goutput_dir=.'
85 error gyp info spawn args ]
85 error gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
85 error gyp info spawn args [
85 error gyp info spawn args 'build/binding.sln',
85 error gyp info spawn args '/clp:Verbosity=minimal',
85 error gyp info spawn args '/nologo',
85 error gyp info spawn args '/p:Configuration=Release;Platform=x64'
85 error gyp info spawn args ]
85 error gyp ERR! build error
85 error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
85 error gyp ERR! stack at ChildProcess.onExit (C:\Users\username\source\repos\projectname\node_modules\node-gyp\lib\build.js:194:23)
85 error gyp ERR! stack at ChildProcess.emit (node:events:369:20)
85 error gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
85 error gyp ERR! System Windows_NT 10.0.19042
85 error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\username\\source\\repos\\projectname\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
85 error gyp ERR! cwd C:\Users\username\source\repos\projectname\node_modules\node-expat
85 error gyp ERR! node -v v15.12.0
85 error gyp ERR! node-gyp -v v8.1.0
85 error gyp ERR! not ok