fix(v10/nuxt): Detect Nitro version via the app's Nuxt dependency chain - #24025
Merged
Merged
Conversation
…24019) In a monorepo where a `nitro` v3 package is resolvable above a Nitro-v2 Nuxt app, the SDK registers the Nitro v3 plugin variants and the app silently loses storage, database, and cache instrumentation. Nitro v2 is published as `nitropack`, v3 as `nitro`. `getNitroMajorVersion()` asked local-pkg for any package named `nitro` with no anchor. Module resolution walks up the directory tree, so an unrelated `nitro` v3 higher up (for example a workspace-root devDependency) wins even though the app's Nuxt imports `nitropack` v2. The fix follows the dependency chain Nuxt itself imports Nitro through: resolve `nuxt` from `rootDir`, hop to `@nuxt/nitro-server` when nuxt declares it (Nuxt >= 3.21), and only resolve `nitro` if that provider declares it. `nitropack` instead means v2: - Nuxt 3.x / 4.0–4.1: `nuxt` → `nitropack@2` - Nuxt ≥4.2 stable: `nuxt` → `@nuxt/nitro-server` → `nitropack@2` - Nuxt 5 nightly: `nuxt` → `@nuxt/nitro-server`(-nightly) → `nitro@3`
s1gr1d
requested review from
chargome and
mydea
and removed request for
a team
September 3, 2026 15:39
Contributor
size-limit report 📦
|
Lms24
approved these changes
Sep 4, 2026
chargome
approved these changes
Sep 4, 2026
47 tasks
brandhaug
added a commit
to brandhaug/b2b-saas-starter
that referenced
this pull request
Sep 20, 2026
## Dependency Updates | Package | From | To | Type | | --- | --- | --- | --- | | `@sentry/cloudflare` | 10.74.0 | 10.75.0 | minor | | `@sentry/react` | 10.74.0 | 10.75.0 | minor | ## Release Notes <details> <summary><b>@<!---->sentry/cloudflare</b> (10.74.0 → 10.75.0)</summary> ### Important Changes - **feat(v10/effect): Capture errors through the Effect v4 `ErrorReporter` API ([#24445](getsentry/sentry-javascript#24445 On Effect v4, `Sentry.effectLayer` now registers a Sentry `ErrorReporter`. Failures that pass through `Effect.withErrorReporting`, `ErrorReporter.report` or the built-in HTTP and RPC reporting boundaries are captured automatically, with `ErrorReporter.ignore`, `ErrorReporter.severity` and `ErrorReporter.attributes` annotations respected. Nothing changes on Effect v3. ### Other Changes - feat(v10/core): Accept a `CollectBehavior` shorthand for `dataCollection.httpHeaders` ([#24339](getsentry/sentry-javascript#24339)) - fix(v10/browser): Release the XHR `virtualError` once the request completed ([#24307](getsentry/sentry-javascript#24307)) - fix(v10/browser-utils): Skip nullish LCP entries in vendored web-vitals ([#24349](getsentry/sentry-javascript#24349)) - fix(v10/bundler-plugins): Stamp debug IDs onto emitted source maps when `disable-upload` is set ([#24332](getsentry/sentry-javascript#24332)) - fix(v10/core): Don't instrument the SDK's own envelope requests ([#24276](getsentry/sentry-javascript#24276)) - fix(v10/nextjs): Only include emitted chunk directories in Turbopack sourcemap upload ([#24295](getsentry/sentry-javascript#24295)) - fix(v10/nitro): Import from nitro/h3 instead of h3 directly ([#24444](getsentry/sentry-javascript#24444)) - fix(v10/node-core): Don't recurse in logAndExitProcess on a broken stdio pipe ([#24353](getsentry/sentry-javascript#24353)) - fix(v10/nuxt): Detect Nitro version via the app's Nuxt dependency chain ([#24025](getsentry/sentry-javascript#24025)) - fix(v10/replay): Don't rewrite already-emitted nodes when syncing mirror attributes ([#23588] …[full notes](https://github.com/getsentry/sentry-javascript/releases/tag/10.75.0) </details> <details> <summary><b>@<!---->sentry/react</b> (10.74.0 → 10.75.0)</summary> ### Important Changes - **feat(v10/effect): Capture errors through the Effect v4 `ErrorReporter` API ([#24445](getsentry/sentry-javascript#24445 On Effect v4, `Sentry.effectLayer` now registers a Sentry `ErrorReporter`. Failures that pass through `Effect.withErrorReporting`, `ErrorReporter.report` or the built-in HTTP and RPC reporting boundaries are captured automatically, with `ErrorReporter.ignore`, `ErrorReporter.severity` and `ErrorReporter.attributes` annotations respected. Nothing changes on Effect v3. ### Other Changes - feat(v10/core): Accept a `CollectBehavior` shorthand for `dataCollection.httpHeaders` ([#24339](getsentry/sentry-javascript#24339)) - fix(v10/browser): Release the XHR `virtualError` once the request completed ([#24307](getsentry/sentry-javascript#24307)) - fix(v10/browser-utils): Skip nullish LCP entries in vendored web-vitals ([#24349](getsentry/sentry-javascript#24349)) - fix(v10/bundler-plugins): Stamp debug IDs onto emitted source maps when `disable-upload` is set ([#24332](getsentry/sentry-javascript#24332)) - fix(v10/core): Don't instrument the SDK's own envelope requests ([#24276](getsentry/sentry-javascript#24276)) - fix(v10/nextjs): Only include emitted chunk directories in Turbopack sourcemap upload ([#24295](getsentry/sentry-javascript#24295)) - fix(v10/nitro): Import from nitro/h3 instead of h3 directly ([#24444](getsentry/sentry-javascript#24444)) - fix(v10/node-core): Don't recurse in logAndExitProcess on a broken stdio pipe ([#24353](getsentry/sentry-javascript#24353)) - fix(v10/nuxt): Detect Nitro version via the app's Nuxt dependency chain ([#24025](getsentry/sentry-javascript#24025)) - fix(v10/replay): Don't rewrite already-emitted nodes when syncing mirror attributes ([#23588] …[full notes](https://github.com/getsentry/sentry-javascript/releases/tag/10.75.0) </details> --- *This PR was auto-generated by [catalog-update-action](https://github.com/brandhaug/catalog-update-action).* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport of #24019