node-pty
node-pty copied to clipboard
Update Windows Installation Prerequisite
Environment details
- OS: Windows 11 x64
- OS version: 23H2 build 22631.2715
- node-pty version:
1.0.0
Issue description
While installing with npm under node v21.4.0
npm install -g node-pty
It failed and produced the following messages for 3 .vcxproj
files, namely: conpty
, conpty_console_list
, and pty
npm ERR! C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(504,5): error MSB8040: Spectre-mitigated libraries are required for this project. Install them from the Visual Studio installer (Individual components tab) for any toolsets and architectures being used. Learn more: https://aka.ms/Ofhn4c [<my nodejs path>\bin\node_modules\node-pty\build\conpty.vcxproj]
Luckily, I was able to resolve this with installing MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (v14.38-17.8)
Thus, the Windows Installation Prerequisite description is quite outdated.
Windows SDK - only the "Desktop C++ Apps" components are needed to be installed
- Not only
Desktop Development with C++
under "Workloads" tab, but also the corresponding Spectre-mitigated libs under "Individual components" tab are needed - (Optional) https://www.npmjs.com/package/windows-build-tools is not needed for newer Node.js env
npm WARN deprecated [email protected]: Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details.`
And node module version throw error
With lts version
Would be great to get this updated in the README. Thanks for posting your solution @Elkiwa