Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-pty build error on Windows #3091

Open
Yu-YuZhang opened this issue Nov 12, 2024 · 6 comments
Open

node-pty build error on Windows #3091

Yu-YuZhang opened this issue Nov 12, 2024 · 6 comments
Assignees
Labels

Comments

@Yu-YuZhang
Copy link

Yu-YuZhang commented Nov 12, 2024

  • Node Version:v18.17.0
  • Platform: Windows11
  • Compiler: (Windows) -->

error G:\HtmlCode\ide-startup\node_modules\node-pty: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: G:\HtmlCode\ide-startup\node_modules\node-pty
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.8.20 found at "G:\miniconda3\envs\py38env\python.exe"

gyp http GET https://nodejs.org/download/release/v18.17.0/node-v18.17.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v18.17.0/node-v18.17.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v18.17.0/SHASUMS256.txt
gyp http GET https://nodejs.org/download/release/v18.17.0/win-x64/node.lib
gyp http 200 https://nodejs.org/download/release/v18.17.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v18.17.0/win-x64/node.lib
gyp info find VS using VS2017 (15.9.35324.217) found at:
gyp info find VS "G:\Microsoft Visual Studio\2017\Enterprise"
gyp info find VS run with --verbose for detailed information
gyp info spawn G:\miniconda3\envs\py38env\python.exe
gyp info spawn args [
gyp info spawn args 'C:\Users\YuTong\AppData\Local\Yarn\Data\global\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 'G:\HtmlCode\ide-startup\node_modules\node-pty\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\YuTong\AppData\Local\Yarn\Data\global\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\YuTong\AppData\Local\node-gyp\Cache\18.17.0\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\YuTong\AppData\Local\node-gyp\Cache\18.17.0',
gyp info spawn args '-Dnode_gyp_dir=C:\Users\YuTong\AppData\Local\Yarn\Data\global\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\YuTong\\AppData\\Local\\node-gyp\\Cache\\18.17.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=G:\HtmlCode\ide-startup\node_modules\node-pty',
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 'G:\HtmlCode\ide-startup\node_modules\node-pty\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn G:\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\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�����ء�
G:\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(402,5): warning MSB8038: ������ Spectre ���⣬���Ҳ��� Spectre ����⡣��֤ Visual Studio �������ɰ��� Spectre ����⡣�й���ϸ��Ϣ������� https://aka.ms/Ofhn4c�� [G:\HtmlCode\ide-startup\node_modules\node-pty\build\conpty.vcxproj]
conpty.cc
path_util.cc
win_delay_load_hook.cc
LINK : fatal error LNK1181: �޷��������ļ���DelayImp.lib�� [G:\HtmlCode\ide-startup\node_modules\node-pty\build\conpty.vcxproj]
G:\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(402,5): warning MSB8038: ������ Spectre ���⣬���Ҳ��� Spectre ����⡣��֤ Visual Studio �������ɰ��� Spectre ����⡣�й���ϸ��Ϣ������� https://aka.ms/Ofhn4c�� [G:\HtmlCode\ide-startup\node_modules\node-pty\build\conpty_console_list.vcxproj]
conpty_console_list.cc
win_delay_load_hook.cc
LINK : fatal error LNK1181: �޷��������ļ���DelayImp.lib�� [G:\HtmlCode\ide-startup\node_modules\node-pty\build\conpty_console_list.vcxproj]
Agent.cc
AgentCreateDesktop.cc
ConsoleFont.cc
ConsoleInput.cc
ConsoleInputReencoding.cc
ConsoleLine.cc
DebugShowInput.cc
DefaultInputMap.cc
EventLoop.cc
InputMap.cc
LargeConsoleRead.cc
NamedPipe.cc
Scraper.cc
Terminal.cc
Win32Console.cc
Win32ConsoleBuffer.cc
main.cc
BackgroundDesktop.cc
Buffer.cc
DebugClient.cc
GenRandom.cc
OwnedHandle.cc
StringUtil.cc
WindowsSecurity.cc
WindowsVersion.cc
WinptyAssert.cc
WinptyException.cc
WinptyVersion.cc
win_delay_load_hook.cc
�������ɴ���
g:\htmlcode\ide-startup\node_modules\node-pty\deps\winpty\src\agent\agent.cc(231): warning C4722: ��Agent::~Agent��: ����������Զ���᷵�أ����ܻᷢ���ڴ�й© [G:\HtmlCode\ide-startup\node_modules\node-pty\build\deps\winpty\src\winpty-agent.vcxproj]
All 1982 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
����ɴ��������
winpty-agent.vcxproj -> G:\HtmlCode\ide-startup\node_modules\node-pty\build\Release\winpty-agent.exe
AgentLocation.cc
winpty.cc
BackgroundDesktop.cc
Buffer.cc
DebugClient.cc
GenRandom.cc
OwnedHandle.cc
StringUtil.cc
WindowsSecurity.cc
WindowsVersion.cc
WinptyAssert.cc
WinptyException.cc
WinptyVersion.cc
win_delay_load_hook.cc
���ڴ����� G:\HtmlCode\ide-startup\node_modules\node-pty\build\Release\winpty.lib �Ͷ��� G:\HtmlCode\ide-startup\node_modules\node-pty\build\Release\winpty.exp
�������ɴ���
All 1156 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
����ɴ��������
winpty.vcxproj -> G:\HtmlCode\ide-startup\node_modules\node-pty\build\Release\winpty.dll
gyp ERR! build error
gyp ERR! stack Error: G:\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess. (C:\Users\YuTong\AppData\Local\Yarn\Data\global\node_modules\node-gyp\lib\build.js:216:23)
gyp ERR! stack at ChildProcess.emit (node:events:514:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Windows_NT 10.0.22631
gyp ERR! command "F:\nvm\nodejs\nodejs\node.exe" "C:\Users\YuTong\AppData\Local\Yarn\Data\global\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd G:\HtmlCode\ide-startup\node_modules\node-pty

@cclauss cclauss changed the title build error node-pty build error on Windows Nov 12, 2024
@cclauss
Copy link
Contributor

cclauss commented Nov 12, 2024

@Yu-YuZhang
Copy link
Author

@cclauss
Copy link
Contributor

cclauss commented Nov 13, 2024

Did you find a solution?

@Yu-YuZhang
Copy link
Author

Did you find a solution?

I just tested it and it all failed. The error message is the same.

@cclauss
Copy link
Contributor

cclauss commented Nov 13, 2024

Perhaps look at these issues https://github.com/microsoft/node-pty/issues

@Yu-YuZhang
Copy link
Author

Hello, this problem still occurs after replacing VS2022. Please help me take a look.

error G:\HtmlCode\ide-startup\node_modules\node-pty: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: G:\HtmlCode\ide-startup\node_modules\node-pty
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.9.1 found at "G:\miniconda3\python.exe"

gyp info find VS using VS2022 (17.13.35507.96) found at:
gyp info find VS "G:\Microsoft Visual Studio\2022\Preview"
gyp info find VS run with --verbose for detailed information
gyp info spawn G:\miniconda3\python.exe
gyp info spawn args [
gyp info spawn args 'C:\Users\YuTong\AppData\Local\Yarn\Data\global\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 'G:\HtmlCode\ide-startup\node_modules\node-pty\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\YuTong\AppData\Local\Yarn\Data\global\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\YuTong\AppData\Local\node-gyp\Cache\18.12.0\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\YuTong\AppData\Local\node-gyp\Cache\18.12.0',
gyp info spawn args '-Dnode_gyp_dir=C:\Users\YuTong\AppData\Local\Yarn\Data\global\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\YuTong\\AppData\\Local\\node-gyp\\Cache\\18.12.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=G:\HtmlCode\ide-startup\node_modules\node-pty',
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 'G:\HtmlCode\ide-startup\node_modules\node-pty\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn G:\Microsoft Visual Studio\2022\Preview\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 ]

G:\Microsoft Visual Studio\2022\Preview\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(504,5): error MSB8040: 此项目需要缓解了 Spectre 漏洞的库。从 Visual Studio 安装程序(单个组件选项卡)为正在使用的任何工具集和体系结构安装它们。了解详信息: https://aka.ms/Ofhn4c [G:\HtmlCode\ide-startup\node_modules\node-pty\build\conpty.vcxproj]
G:\Microsoft Visual Studio\2022\Preview\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(504,5): error MSB8040: 此项目需要缓解了 Spectre 漏洞的库。从 Visual Studio 安装程序(单个组件选项卡)为正在使用的任何工具集和体系结构安装它们。了解详信息: https://aka.ms/Ofhn4c [G:\HtmlCode\ide-startup\node_modules\node-pty\build\conpty_console_list.vcxproj]
Agent.cc
AgentCreateDesktop.cc
ConsoleFont.cc
ConsoleInput.cc
ConsoleInputReencoding.cc
ConsoleLine.cc
DebugShowInput.cc
DefaultInputMap.cc
EventLoop.cc
InputMap.cc
LargeConsoleRead.cc
NamedPipe.cc
Scraper.cc
Terminal.cc
Win32Console.cc
Win32ConsoleBuffer.cc
main.cc
BackgroundDesktop.cc
Buffer.cc
DebugClient.cc
GenRandom.cc
OwnedHandle.cc
StringUtil.cc
WindowsSecurity.cc
WindowsVersion.cc
WinptyAssert.cc
WinptyException.cc
WinptyVersion.cc
win_delay_load_hook.cc
正在生成代码
Previous IPDB not found, fall back to full compilation.
G:\HtmlCode\ide-startup\node_modules\node-pty\deps\winpty\src\agent\Agent.cc(231): warning C4722: “Agent::~Agent”: 析构函数永远不会返回,可能会发生内存泄漏 [G:\HtmlCode\ide-startup\node_modules\node-pty\build\deps\winpty\src\winpty-agent.vcxproj]
All 1735 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
已完成代码的生成
winpty-agent.vcxproj -> G:\HtmlCode\ide-startup\node_modules\node-pty\build\Release\winpty-agent.exe
AgentLocation.cc
winpty.cc
BackgroundDesktop.cc
Buffer.cc
DebugClient.cc
GenRandom.cc
OwnedHandle.cc
StringUtil.cc
WindowsSecurity.cc
WindowsVersion.cc
WinptyAssert.cc
WinptyException.cc
WinptyVersion.cc
win_delay_load_hook.cc
正在创建库 G:\HtmlCode\ide-startup\node_modules\node-pty\build\Release\winpty.lib 和对象 G:\HtmlCode\ide-startup\node_modules\node-pty\build\Release\winpty.exp
正在生成代码
Previous IPDB not found, fall back to full compilation.
All 1043 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
已完成代码的生成
winpty.vcxproj -> G:\HtmlCode\ide-startup\node_modules\node-pty\build\Release\winpty.dll
G:\Microsoft Visual Studio\2022\Preview\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(504,5): error MSB8040: 此项目需要缓解了 Spectre 漏洞的库。从 Visual Studio 安装程序(单个组件选项卡)为正在使用的任何工具集和体系结构安装它们。了解详信息: https://aka.ms/Ofhn4c [G:\HtmlCode\ide-startup\node_modules\node-pty\build\pty.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: G:\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess. (C:\Users\YuTong\AppData\Local\Yarn\Data\global\node_modules\node-gyp\lib\build.js:216:23)
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Windows_NT 10.0.22631
gyp ERR! command "F:\nvm\nodejs\nodejs\node.exe" "C:\Users\YuTong\AppData\Local\Yarn\Data\global\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd G:\HtmlCode\ide-startup\node_modules\node-pty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants