Skip to content

test(nextjs): Raise @opennextjs/cloudflare floor for nextjs-16 - #25682

Merged
mydea merged 2 commits into
developfrom
test/nextjs-16-cf-canary-variant
Oct 28, 2026
Merged

mydea merged 2 commits into
developfrom
test/nextjs-16-cf-canary-variant

Conversation

@mydea

@mydea mydea commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

This raises the @opennextjs/cloudflare floor of the nextjs-16 app to ^1.20.12. That release contains the fix for opennextjs/opennextjs-cloudflare#1356, which is why the Cloudflare variants were pinned to 16.3 before instead or latest.

Note that the canary variant is still not re-enabled, because there seems to be a bug in @opennextjs/cloudflare. See below for details on what may be happening there.

Canary is still failing (follow up work needed):

This PR originally also restored the nextjs-16 (cloudflare, canary) variant, but that variant currently fails nearly every test with a 500, so it is not re-added yet.

Workerd can't require dynamic paths, so OpenNext rewrites the Turbopack runtime's require(resolved) chunk loads into a call to a function requireChunk(chunkPath) it appends to [turbopack]_runtime.js. Next.js 16.5 canary (seen with 16.5.0-canary.28 and @opennextjs/cloudflare@1.20.13) now declares its own function requireChunk(chunkPath, sourceModuleId) in that file. It is used for async chunk loads and also installs the chunk's module factories. Both declarations live in the same scope, so OpenNext's wins. Async chunk loads then only require the chunk without registering its modules. Our instrumentation.ts loads sentry.server.config with a dynamic import(), so every request fails with An error occurred while loading instrumentation hook: Module … was instantiated … but the module factory is not available, which OpenNext turns into a generic 500. Renaming OpenNext's injected helper fixes it: with that change, the whole nextjs-16 Cloudflare suite passes locally on canary. Next.js 16.4 has no requireChunk of its own, which is why the latest variant passes.

The canary variant can come back once OpenNext ships a fix for this.

Ref #23541

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 837f086 (PR test merge using develop at 3cb76b2)

Against: 3cb76b2 (develop) · base run #63878

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.33 kB - -
@sentry/browser - with treeshaking flags 28.45 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.34 kB - -
@sentry/browser (incl. Tracing) 52.54 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.54 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.47 kB - -
@sentry/browser (incl. Tracing, Replay) 92.3 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.18 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.04 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.03 kB - -
@sentry/browser (incl. Feedback) 47.89 kB - -
@sentry/browser (incl. sendFeedback) 35.4 kB - -
@sentry/browser (incl. FeedbackAsync) 40.51 kB - -
@sentry/browser (incl. Metrics) 31.34 kB - -
@sentry/browser (incl. Logs) 31.62 kB - -
@sentry/browser (incl. Metrics & Logs) 32.3 kB - -
@sentry/react 32.14 kB - -
@sentry/react (incl. Tracing) 54.82 kB - -
@sentry/vue 38.46 kB - -
@sentry/vue (incl. Tracing) 55.45 kB - -
@sentry/svelte 30.36 kB - -
@sentry/remix (Remix 3 client bundle) 57.59 kB - -
CDN Bundle 32.06 kB - -
CDN Bundle (incl. Tracing) 53.02 kB - -
CDN Bundle (incl. Logs, Metrics) 34.26 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.99 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 75.25 kB - -
CDN Bundle (incl. Tracing, Replay) 90.74 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.67 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.85 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.82 kB - -
CDN Bundle - uncompressed 94.29 kB - -
CDN Bundle (incl. Tracing) - uncompressed 157.14 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.84 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.11 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 231.06 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.48 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 283.44 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 291.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 297.13 kB - -
@sentry/nextjs (client) 57.69 kB - -
@sentry/sveltekit (client) 53 kB - -
@sentry/core/server 43.69 kB - -
@sentry/core/browser 13.81 kB - -
@sentry/node 154.24 kB +0.02% +19 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.62 kB - -
@sentry/node - without tracing 95.55 kB +0.02% +17 B 🔺
@sentry/node - without channel injection 134.9 kB +0.01% +4 B 🔺
@sentry/aws-serverless 103.71 kB +0.01% +7 B 🔺
@sentry/cloudflare (withSentry) - minified 197.28 kB - -
@sentry/cloudflare (withSentry) 490.08 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 217.86 kB - -

View base workflow run

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

All optional checks were successful. 6 successful. See the run.

Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (canary, webpack) Test (optional) Successful in 4m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (canary, turbopack) Test (optional) Successful in 4m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 1m Details

@mydea
mydea force-pushed the test/nextjs-16-cf-canary-variant branch 2 times, most recently from 37b2faa to 4adfdbf Compare October 27, 2026 08:38
@mydea mydea changed the title test(nextjs): Restore Cloudflare canary variant for nextjs-16 test(nextjs): Raise @opennextjs/cloudflare floor for nextjs-16 Oct 28, 2026
mydea and others added 2 commits October 28, 2026 09:30
opennextjs/opennextjs-cloudflare#1356 shipped in @opennextjs/cloudflare
1.20.12, so restore the canary variant on the Cloudflare runtime and
unpin the latest variant from Next.js 16.3.

Fixes #23541

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OpenNext's Turbopack runtime patch breaks on Next.js 16.5 canary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mydea
mydea force-pushed the test/nextjs-16-cf-canary-variant branch from 34d1032 to 8d9cf52 Compare October 28, 2026 08:31
@mydea
mydea marked this pull request as ready for review October 28, 2026 08:49
@mydea
mydea requested review from JPeer264 and chargome October 28, 2026 08:49
@mydea
mydea merged commit 0b43124 into develop Oct 28, 2026
55 checks passed
@mydea
mydea deleted the test/nextjs-16-cf-canary-variant branch October 28, 2026 13:31
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