Skip to content

[BUG] Installing certain packages is extremely slow #6391

@bbrk24

Description

@bbrk24

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

Currently, my package.json specifies "typescript": "^5.0.2". When I change it to say "typescript": "^5.0.3", npm 9 spins for 4:28 before deciding it doesn't exist. For comparison, npm 8 installs it with no problem in 0:44.

Ironically, I can't upgrade npm to 9.6 due to this issue: npm 9.5.1 times out when I run npm i -g npm.

Expected Behavior

npm 9 should be able to locate and download these versions with similar performance to npm 8.

Steps To Reproduce

  1. Have a project with a v2 lockfile and TypeScript 5.0.2
  2. Install node 18.16.0 with npm 9.5.1
  3. Update the package.json to request TypeScript 5.0.3 or newer
  4. Run npm i

Environment

  • npm: 9.5.1
  • Node.js: 18.16.0
  • OS Name: Windows 10
  • System Model Name: Maingear Vector 2
  • npm config:
; "user" config from C:\Users\bbrk2\.npmrc

//registry.npmjs.org/:_authToken = (protected) 

; node bin location = C:\Users\bbrk2\.nvm\versions\node\v18.16.0\bin\node.exe
; node version = v18.16.0
; npm local prefix = C:\Users\bbrk2\[REDACTED]
; npm version = 9.5.1
; cwd = C:\Users\bbrk2\[REDACTED]
; HOME = C:\Users\bbrk2
; Run `npm config ls -l` to show all defaults.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 9.xwork is associated with a specific npm 9 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions