GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(arborist): do not install inert optional extraneous shared dependencies by github-actions[bot] · Pull Request #9238 · npm/cli

Conversation

@github-actions

@github-actions github-actions Bot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Backport of #9221 to release/v11.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lovell @npm-cli-bot
fix(arborist): do not install inert optional extraneous shared depend…
b908353
…encies (#9221)

A shared dependency of two or more umet optional dependencies, where no
other package in the tree also depends on that shared package, does not
need to be installed.

This removes packages currently marked as extraneous from trees where
one or more failed-optional (platform-specific) packages share a
transitive dependency, with `@emnapi/runtime` being a good example of
this.

Before:
```
$ node /path/to/cli/bin/npm-cli.js install [email protected]
added 9 packages in 325ms

$ npm ls --all
├─┬ @emnapi/[email protected] extraneous
│ └── [email protected] deduped
├─┬ @img/[email protected] extraneous
│ └── @emnapi/[email protected] deduped
├─┬ [email protected]
│ ├── @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├─┬ @img/[email protected]
│ │ └── @img/[email protected] deduped
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
│ ├── [email protected]
│ └── [email protected]
└── [email protected] extraneous

$ du -s node_modules/
28824	node_modules/
```

After:
```
$ node /path/to/cli/bin/npm-cli.js install [email protected]
added 6 packages in 1s

$ npm ls --all
└─┬ [email protected]
  ├── @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├─┬ @img/[email protected]
  │ └── @img/[email protected] deduped
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── UNMET OPTIONAL DEPENDENCY @img/[email protected]
  ├── [email protected]
  └── [email protected]

$ du -s node_modules/
18336	node_modules/
```

## References

Fixes #8832

(cherry picked from commit 1d058b0)
@github-actions
github-actions Bot requested a review from a team as a code owner April 15, 2026 18:04
wraithgar
wraithgar approved these changes Apr 15, 2026
View reviewed changes
@wraithgar
wraithgar merged commit 7e3a66e into release/v11 Apr 15, 2026
@wraithgar
wraithgar deleted the backport/v11/9221 branch April 15, 2026 18:17
@github-actions github-actions Bot mentioned this pull request Apr 15, 2026
chore: release 11.13.0 #9240
Merged
@marcoshernanz marcoshernanz mentioned this pull request Aug 25, 2026
extraneous emnapi/[email protected] in Next.js 15 via Sharp cannot remove vercel/next.js#84450
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@wraithgar wraithgar wraithgar approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@wraithgar @lovell
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.