Skip to content

[BUG] all commands fail: TypeError: LRU is not a constructor #6785

Description

@iambumblehead

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

npm --version and other commands print a runtime error

$ npm --version
/usr/lib/node_modules/npm/lib/es6/validate-engines.js:31
throw err
^
TypeError: LRU is not a constructor
at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/semver/classes/range.js:188:15)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/semver/functions/satisfies.js:1:15)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)

Expected Behavior

npm commands should not fail with a runtime error

$ npm --version
10.0.0-1

Steps To Reproduce

  1. install npm
  2. use any npm command, such as "npm --version", "npm install" or "npm test".
  3. see runtime error

Environment

  • npm: 10.0.0-1
  • Node.js: v20.6.0
  • OS Name: Arch Linux
  • System Model Name: xps13
  • npm config: (generated from the previous, working version of npm, version 9.8.1)
; "user" config from /home/bumble/.npmrc
//registry.npmjs.org/:_authToken = (protected) ; node bin location = /usr/bin/node; node version = v20.6.0; npm local prefix = /home/bumble/software/esmock; npm version = 9.8.1; cwd = /home/bumble/software/esmock; HOME = /home/bumble; Run `npm config ls -l` to show all defaults.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions