Skip to content

[BUG] npm ls command listing EXTRANEOUS package for clean install #8832

Description

@Chardrazle

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

The npm lscommand lists an EXTRANEOUS package, that doesn't appear to be removable.
Not sure if it's an upstream package dependency problem, mind.

Expected Behavior

No EXTRANEOUS package.

Steps To Reproduce

With package.json:

{
  "name": "test",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "eslint ."
  },
  "dependencies": {
    "@tanstack/react-query": "^5.90.12",
    "@uidotdev/usehooks": "^2.4.1",
    "axios": "^1.13.2",
    "bootstrap": "^5.3.8",
    "next": "^16.0.7",
    "next-auth": "^5.0.0-beta.27",
    "react": "^19.2.1",
    "react-bootstrap": "^2.10.10",
    "sharp": "^0.34.5",
    "zod": "^4.1.13"
  },
  "devDependencies": {
    "@types/node": "^24.10.1",
    "baseline-browser-mapping": "^2.9.2",
    "eslint": "^9.39.1",
    "eslint-config-next": "^16.0.7",
    "typescript": "^5.9.3"
  }
}

Steps:

$ rm -rf node_modules/ package-lock.json
$ npm i
...
$ npm ls --all --parseable --long --omit=dev --omit=optional | grep EXT
.../npm_test/node_modules/@emnapi/runtime:@emnapi/[email protected]:EXTRANEOUS

Environment

$ uname -ra
Linux <hostname> 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64 GNU/Linux
$ npm config ls
; node bin location = .../.nvm/versions/node/v22.14.0/bin/node
; node version = v22.14.0
; npm local prefix = .../npm_test
; npm version = 11.6.4
; cwd = .../npm_test
; HOME = ...
; 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

    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