nextjs - 💡(How to fix) Fix extraneous emnapi/[email protected] in Next.js 15 via Sharp cannot remove [6 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#84450Fetched 2026-04-08 02:19:21
View on GitHub
Comments
6
Participants
2
Timeline
11
Reactions
1
Timeline (top)
commented ×6cross-referenced ×2issue_type_added ×1labeled ×1

Code Example

---

**Environment:**

* OS: Debian (latest stable)
* Node.js: v22.x (LTS)
* npm: v10+
* Next.js: 15.5.4 (latest stable)
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template?file=%2F.gitignore

To Reproduce

npx create-next-app@latest next-test cd next-test npm ls

next-test ├── @emnapi/[email protected] extraneous ├── @tailwindcss/[email protected] ├── @types/[email protected] ├── @types/[email protected] ├── @types/[email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected]

@emnapi/[email protected] extraneous cannot be removed.

Current vs. Expected behavior

Current: emnapi/[email protected] shows up as an extraneous dependency immediately after installation.

Running npm uninstall emnapi/[email protected] or other cleanup commands (npm prune, reinstalling, clearing caches) does not remove it.

The dependency remains in node_modules marked as extraneous, causing confusion and potential build/runtime issues.

This extraneous dependency cannot be removed without abandoning Next.js altogether.

Expected: I expected a clean install with no extraneous dependencies listed post install

Provide environment information

---

**Environment:**

* OS: Debian (latest stable)
* Node.js: v22.x (LTS)
* npm: v10+
* Next.js: 15.5.4 (latest stable)

Which area(s) are affected? (Select all that apply)

create-next-app

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

No response

extent analysis

TL;DR

  • The issue can likely be mitigated by manually removing the extraneous @emnapi/runtime package from the project.

Guidance

  • Verify that @emnapi/runtime is not a dependency of any other packages in the project by checking the package.json files of all dependencies.
  • Attempt to remove @emnapi/runtime manually by deleting the corresponding folder in node_modules and then running npm install to ensure dependencies are correctly installed.
  • If the issue persists, try creating a new project with npx create-next-app@latest and compare the package.json and node_modules directories to identify any differences.
  • Check the npm ls output for any other extraneous dependencies that may be causing issues.

Example

No code snippet is provided as the issue is related to package management rather than code.

Notes

  • The issue seems to be related to the create-next-app template or the next package itself, as the extraneous dependency appears immediately after installation.
  • Manually removing the package may not be a permanent solution, as it may be reinstalled by other dependencies or during future updates.

Recommendation

  • Apply workaround: Manually remove the extraneous @emnapi/runtime package and monitor the project for any issues that may arise from its removal, as it may be a dependency of another package.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING