Skip to content

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

Description

@mrrobbins

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.

Activity

  1. added
    windowsIssues and PRs related to the Windows platform.
    on Oct 6, 2021
  2. cjihrig commented on Oct 6, 2021

    @cjihrig
    Contributor

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

  3. bzoz commented on Oct 19, 2021

    @bzoz
    Contributor

    Sorry, Node.js no longer supports Win7

  4. serhiisp commented on Dec 21, 2021

    @serhiisp

    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

  5. stanleyxu2005 commented on Nov 23, 2023

    @stanleyxu2005

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions