Skip to content

[BUG] When using Docker image, installing package globally is hanging #7686

Closed
@cmerat

Description

@cmerat

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

When installing a package globally, the installation "hangs" after "fetch/packumentCache" steps for minutes before proceeding and completing with a bunch of "placeDep" steps. This behavior started happening approximately two months ago and has continued since. This is making building the container images for my app very slow (5+ mins).
npm-install.log

Expected Behavior

The installation should not hang or, at the very least, give me feedback on what is taking so long.

Steps To Reproduce

  1. docker run -it --rm --entrypoint /bin/sh node:20-alpine
  2. npm i -g --verbose vite

Environment

  • npm: 10.8.2
  • Node.js: 20.12.2
  • OS Name: Alping Linux
  • System Model Name: Docker Desktop
  • npm config:
; node bin location = /usr/local/bin/node
; node version = v20.12.2
; npm local prefix = /
; npm version = 10.8.2
; cwd = /
; HOME = /root
; Run `npm config ls -l` to show all defaults.

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