Skip to content

[BUG] Windows support appears to be missing config and definitions files which were present in earlier versions of NodeJS #8296

Open
@natesire

Description

@natesire

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Missing files for Windows support.

Expected Behavior

I cannot find vital files which Windows needs to run npm

It looks like @npmcli/config/lib/definitions has either been moved in recent versions of Node or not included.

And because Windows needs it, npm will not run.

const Config = require('@npmcli/config')

Steps To Reproduce

  1. Windows
  2. Run 'npm' on the command line
  3. Missing @npmcli/config

Environment

  • npm: 10.9.2 and the Github latest code
  • Node.js: 22.14
  • OS Name: Windows 11
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here

npm will not run.

PS C:\Users\nates\github\cli> npm
node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module '@npmcli/config'
Require stack:

The way to prevent these types of errors from getting into the "wild" is to setup a break-box on the infrastructure pipeline to test the nightly against various platforms: Linux, Windows, iOs. Instead of relying on developers to test the releases. I will have to try rolling back the npm version to a previous version but since the node version is so tightly coupled to the npm version, not sure it will work. I'll have to rollback my Node version too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions