Skip to content

fix(nuxt): Import from #imports/server in addMiddlewareImports() - #24150

Merged
s1gr1d merged 5 commits into
developfrom
sig/wrap-with-resolver-nuxt
Sep 9, 2026
Merged

fix(nuxt): Import from #imports/server in addMiddlewareImports()#24150
s1gr1d merged 5 commits into
developfrom
sig/wrap-with-resolver-nuxt

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Sep 7, 2026

Copy link
Copy Markdown
Member

The nuxt-5 (canary) E2E build fails with "wrapMiddlewareHandlerWithSentry" is not exported by ".nuxt/types/server-imports.mjs".

In Nuxt 5, the import path is import path is #imports/server.

Reference: nuxt/nuxt#36296

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 28.81 kB - -
@sentry/browser - with treeshaking flags 27.12 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.01 kB - -
@sentry/browser (incl. Tracing) 49.22 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 49.22 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.15 kB - -
@sentry/browser (incl. Tracing, Replay) 88.76 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.94 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 93.44 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 106.38 kB - -
@sentry/browser (incl. Feedback) 46.3 kB - -
@sentry/browser (incl. sendFeedback) 33.87 kB - -
@sentry/browser (incl. FeedbackAsync) 38.99 kB - -
@sentry/browser (incl. Metrics) 29.84 kB - -
@sentry/browser (incl. Logs) 30.1 kB - -
@sentry/browser (incl. Metrics & Logs) 30.78 kB - -
@sentry/react 30.57 kB - -
@sentry/react (incl. Tracing) 51.57 kB - -
@sentry/vue 36.07 kB - -
@sentry/vue (incl. Tracing) 51.49 kB - -
@sentry/svelte 28.85 kB - -
CDN Bundle 30.56 kB - -
CDN Bundle (incl. Tracing) 49.76 kB - -
CDN Bundle (incl. Logs, Metrics) 32.83 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 51.7 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.48 kB - -
CDN Bundle (incl. Tracing, Replay) 87.28 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.2 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 93.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.22 kB - -
CDN Bundle - uncompressed 90.47 kB - -
CDN Bundle (incl. Tracing) - uncompressed 148.17 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.04 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 154.13 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.3 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.76 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.71 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.46 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 287.4 kB - -
@sentry/nextjs (client) 54.02 kB - -
@sentry/sveltekit (client) 49.68 kB - -
@sentry/core/server 36.99 kB - -
@sentry/core/browser 13.55 kB - -
@sentry/node 127.86 kB +0.02% +21 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.61 kB - -
@sentry/node - without tracing 88.73 kB +0.03% +21 B 🔺
@sentry/node - without channel injection 107.11 kB +0.03% +22 B 🔺
@sentry/aws-serverless 97.12 kB +0.03% +26 B 🔺
@sentry/cloudflare (withSentry) - minified 201.98 kB - -
@sentry/cloudflare (withSentry) 502.68 kB - -

View base workflow run

@s1gr1d
s1gr1d requested a review from logaretm September 7, 2026 12:29
@s1gr1d s1gr1d changed the title fix(nuxt): Inject handler import from resolved path, delete addMiddlewareImports() fix(nuxt): Import from #imports/server in addMiddlewareImports() Sep 8, 2026
@s1gr1d
s1gr1d marked this pull request as ready for review September 8, 2026 11:21
@s1gr1d
s1gr1d requested a review from a team as a code owner September 8, 2026 11:21
@s1gr1d
s1gr1d requested review from mydea and nicohrubec and removed request for a team September 8, 2026 11:21
Comment thread packages/nuxt/src/module.ts Outdated

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now we get [MISSING_EXPORT] "wrapMiddlewareHandlerWithSentry" is not exported by ".nuxt/types/server-imports.mjs". 😅

@s1gr1d

s1gr1d commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

now we get [MISSING_EXPORT] "wrapMiddlewareHandlerWithSentry" is not exported by ".nuxt/types/server-imports.mjs". 😅

Yes, that's the same error as before but it's because the fix is not yet released :D

But I could change the version number to the commit specifically

@s1gr1d
s1gr1d enabled auto-merge (squash) September 8, 2026 15:29
@s1gr1d
s1gr1d merged commit ee5d353 into develop Sep 9, 2026
56 of 57 checks passed
@s1gr1d
s1gr1d deleted the sig/wrap-with-resolver-nuxt branch September 9, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants