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

Nodejs 14.18.0 breaks on Windows 7 - procedure entry point GetHostNameW could not be located #40353

Closed
mrrobbins opened this issue Oct 6, 2021 · 4 comments
Labels
windows Issues and PRs related to the Windows platform.

Comments

@mrrobbins
Copy link

mrrobbins commented Oct 6, 2021

Version

14.18.0

Platform

Microsoft Windows NT 6.1.7601 Service Pack 1 x64

Subsystem

No response

What steps will reproduce the bug?

Run any node command, a simple node -v is enough to reproduce

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior?

Node command should execute and not throw dll error.

What do you see instead?

Windows error dialog:

Title: node.exe - Entry Point Not Found
Body: The procedure entry point GetHostNameW could not be located in the dynamic link library WS2_32.dll.
Button options: OK

Additional information

I have read the docs and I am aware Node.js 14 drops platform support for Windows 7 meaning it is no longer tested and may be broken. However I have a requirement to use Windows 7 so I have tried, successfully, to use 14 .x until I upgraded to 14.18.0 which broke for me. Multiple previously releases of 14.x have worked without issue. Filing this issue for awareness and to see if this was an intentional / known break or something that might be addressed in a future 14 release.

@Mesteery Mesteery added the windows Issues and PRs related to the Windows platform. label Oct 6, 2021
@cjihrig
Copy link
Contributor

cjihrig commented Oct 6, 2021

This is a result of the libuv 1.42.0 update in #39525.

@bzoz
Copy link
Contributor

bzoz commented Oct 19, 2021

Sorry, Node.js no longer supports Win7

@serhiisp
Copy link

Node.js, through unsupported, works for me on Windows 7 SP 1 up until v16.6.2 .
I get the same "GetHostNameW" error starting with v16.7.0 .

As .msi installers refuse to work since v14, to install or update Node I used a solution described here:

https://stackoverflow.com/a/64626035

@stanleyxu2005
Copy link

stanleyxu2005 commented Nov 23, 2023

This is a result of the libuv 1.42.0 update in #39525.

It's true that libuv 1.4.2 dropped the Windows 7 support.

Except os.hostname(), I don't see any other api is broken after libuv upgrade.

If Node maintainer could accept a fallback logic for unsupported Windows, I'm happy to create a PR for discussion. Some mock code for inspiration. I know nodejs is for js but not written in js.

function hostname() {
   try {
      return libuv.gethostname()
   } catch (ex) {
     // fallback solution for unsupported platforms
      return process.env['HOSTNAME']
   }
}

It's small amount of effort but has huge impact to the whole nodejs eco-system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

6 participants