You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@sentry/nuxt 11: optional nitro peer makes npm install fail with ERESOLVE on Vite 8 #25761
How do you use Sentry? Sentry Saas (sentry.io)
Which SDK are you using? @sentry/nuxt
SDK Version: 11.9.0
Framework Version: Nuxt 4.6.3 (nitropack 2.13.5), Vite 8.3.5, Node 24.22.1, npm 11.19.1
Link to Sentry event: n/a (install-time issue)
Reproduction Example/SDK Setup
Nuxt 4.6 app with @sentry/nuxt@^10 installed. Nuxt 4.6.3 itself depends on nitropack@^2.13.5 (via @nuxt/nitro-server) and vite@^8.3.5 (via @nuxt/vite-builder, also a peer of @nuxt/vite-server), so Vite 8 is required and the nitro package isn't installed at all.
Steps to Reproduce
npm install -S @sentry/nuxt@^11
Expected Result
The install succeeds. nitro is an optional peer of @sentry/nuxt (peerDependenciesMeta.nitro.optional: true) and isn't installed in the project, so its peer requirements shouldn't matter.
Actual Result
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: frontend@undefined
npm error Found: @sentry/nuxt@10.63.0
npm error node_modules/@sentry/nuxt
npm error dev @sentry/nuxt@"^11" from the root project
npm error
npm error Could not resolve dependency:
npm error dev @sentry/nuxt@"^11" from the root project
npm error
npm error Conflicting peer dependency: vite@7.3.7
npm error node_modules/vite
npm error peerOptional vite@"^7" from nitro@3.0.0
npm error node_modules/nitro
npm error peerOptional nitro@"2.x || 3.x" from @sentry/nuxt@11.9.0
npm error node_modules/@sentry/nuxt
npm error dev @sentry/nuxt@"^11" from the root project
npm resolves the optional nitro@"2.x || 3.x" peer to nitro@3.0.0, whose optional vite@"^7" peer conflicts with the project's Vite 8. Since Nuxt 4.6 requires Vite 8, this should affect every npm user upgrading a Nuxt 4.6 app to @sentry/nuxt 11.
Additional Context
Workarounds:
--force works, and the resulting lockfile installs fine with a plain npm ci. Every later npm install still hits the same error, though.
--legacy-peer-deps isn't a usable workaround, because it also drops other auto-installed peers (e.g. typescript) from the lockfile.
Possible fix: widen or narrow the nitro peer range so npm doesn't pick a nitro release that requires Vite 7 (e.g. once a Nitro 3 release supports Vite 8), or drop the nitro peer if nitropack users don't need it.
Activity
linear-code commentedon Oct 27, 2026
JS-4009
fix(nuxt,nitro): Accept Nitro 3 betas without narrowing peer support (#…
msonnb commentedon Oct 28, 2026
Hey, thanks for reporting! The fix will be included in our next release.
github-actions commentedon Oct 28, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #25815, which was included in the 11.10.0 release.