Next.js 16.3 Preview — Feedback #95130
Replies: 35 comments 93 replies
|
Hi @samselikoff! Testing 16.3 Preview with Turbopack + This cannot be silenced when a filesystem call receives a This has been originally reported here: #95125 Additional details📁 Minimal Reproduction// lib/loader.js
import fs from 'fs'
import path from 'path'
const folder = path.join(process.cwd(), 'data')
// ✅ WORKS — bare variable, comment silences warning
const files = fs.readdirSync(/* turbopackIgnore: true */ folder)
// ❌ STILL WARNS — no comment placement can silence this
const contents = files.map(f =>
fs.readFileSync(path.join(folder, f), 'utf8')
)
// ❌ STILL WARNS — this is the EXACT form the warning recommends!
const contents2 = files.map(f =>
fs.readFileSync(path.join(/* turbopackIgnore: true */ folder, f), 'utf8')
)
// ❌ STILL WARNS
const contents3 = files.map(f =>
fs.readFileSync(/* turbopackIgnore: true */ path.join(folder, f), 'utf8')
)Steps to reproduce:
📊 Annotation Behavior Matrix
🔍 Root Cause (Traced in Source)After digging into the Turbopack source, the exact bug is in:
// All call arguments are always linked with EMPTY ImportAttributes
// The `ignore` flag is NEVER passed down to argument expressions
let linked_args = || async {
linked_args_cache.get_or_try_init(|| async {
unlinked_args
.iter()
.map(|arg| arg.clone_in(state.arena.get_or_default()))
.map(|arg| state.link_value(arg, ImportAttributes::empty_ref())) // ← BUG
.try_join()
.await
}).await
};What this means:
The 💥 Why It Matters (Not Just Cosmetic)This is a real deployment risk in these common cases: 1. Runtime-resolved data folders: // You CANNOT silence this no matter what
const data = fs.readFileSync(path.join(process.cwd(), 'data', filename), 'utf8')2. Libraries in // Inside node_modules — you cannot add comments here at all
const files = fs.readdirSync(migrationsFolder)
files.map(f => fs.readFileSync(path.join(migrationsFolder, f)))Result: The entire project — including the
🌍 Environment
🔗 Related Issues
✅ Expected BehaviorThe 💡 Proposed Fix DirectionIn
Happy to submit a PR if that would help! 🙏 |
|
I love the new defaults with One thing I'm confused about: with Based on this from the docs I would not expect runtime data to be prefetched without configuring 'allow-runtime':
|
|
Hey @samselikoff - there are very good reports on dev build performance for Turbopack here. Everyone in that thread (and my team) is eagerly awaiting release! |
|
I seem to have found a bug with Instant Insights. In my setup, I have a top-level loading.tsx file ( |
|
I might be missing something obviously, but think I've ran into a bug with meta titles (or maybe metadata in general) for built apps. On a fresh load of a page with Example metadata I'm using on most of my pages atm: I've found that disabling |
|
I got this runtime error using react-email in preview.5 prettier is only used as subdependency of react-email BTW it does not error in canary.32 |
|
Is |
|
I tried the latest 16.3 Canary and I so happy!!! My memory usage dropped from ~20 GB to ~5GB!! Thanks so much!!! My team is very excited to the 16.3 release! |
|
When two unrelated routes each inject Instant navigation is great :) |
|
After upgrading to the latest preview version, I'm seeing the following warning in the terminal: |
|
Hi, I just read the blog post about the new instant navigations feature, and I gotta say it's pretty nice, and it's a step in the right direction. I'm a bit curious though as to what is the difference between this and the loading.tsx component we already had, cause I can see everyone already hacking it and pointing out things and all that, but I genuinely out of pure curiosity just want to know what the difference is between this and the loading component, and I think future blog post containing a comparison of both or maybe a best practice guide on when to use both would be well appreciated by everyone. Thank you very much, and I love the work you guys are doing. |
|
I tried deploying to AWS using SST The deployment works as expected when |
|
Why is the rust react compiler turbopack only? The webpack compilation also uses SWC and could use the rust port. I would love to try it out without the hassle (and issues) to migrate to turbopack |
|
i am seeing this issue from 16.2 release #93126, Its still not fixed in 16.3. Any update when can we have it fixed ? Context: Expected behavior |
|
A known issue with turbopack + NextJS 16 is still there: |
|
since the TS 7 was released yesterday(https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/), hope that 16.3 will integrate it to cut down the time of the compiling and hot loading when developing. |
|
It's great to see that several reports in this thread ended up uncovering the same underlying Windows persistence issue, and that it has already been fixed. One thing I'd suggest for future preview releases is making the persistence layer fail a bit more gracefully from a diagnostics perspective. Right now users mostly see: Persisting failed: Unable to commit operations From that message it's hard to tell whether the failure came from:
Even a small amount of extra context, such as the filesystem operation that failed (rename, sync, delete, commit, etc.) or the affected path, would make reports much easier to triage without asking users to rerun with tracing enabled. The fix addressed the bug itself, but improving the diagnostics would also reduce duplicate reports whenever a new platform-specific filesystem issue appears in the future. |
|
It seems like the standalone output is getting worse in 16.3, where Turbopack keeps generating broken hashed aliases for external modules. Since Turbopack is the default bundler, which makes it kinda unusable, I am already facing the similar issue on multiple projects. This is one of the existing issues #87737, where I think it already includes some small repro, feel free to request anything from me. |
|
Just coming here to say that I've been using the preview for a while, and I'm loving the changes! Thank you :) |
|
After upgrading from Next.js The build itself succeeds, and the application otherwise works normally. The error only appears when the affected page is loaded for the first time after the build. import { Suspense } from "react";
import { listItems } from "./queries";
type Props = PageProps<"/items">;
export default function Page({ searchParams }: Props) {
return (
<Suspense fallback={<p>Loading...</p>}>
<TestComponent searchParams={searchParams} />
</Suspense>
);
}
async function TestComponent({
searchParams,
}: {
searchParams: Props["searchParams"];
}) {
const result = await listItems(await searchParams);
return <pre>{JSON.stringify(result, null, 2)}</pre>;
}The cached database query is approximately: import db from "./db";
type SearchParams = Record<string, string | string[] | undefined>;
export async function listItems(params: SearchParams) {
"use cache";
return db.query.items.findMany({
where: {
...(params.q
? {
name: {
like: `%${params.q}%`,
},
}
: {}),
},
limit: 24,
offset: 0,
orderBy: {
name: "asc",
},
});
}My Next.js configuration includes: const config: NextConfig = {
reactCompiler: true,
cacheComponents: true,
partialPrefetching: true,
experimental: {
useTypeScriptCli: true,
},
};Any advice on likely causes? |
|
I tested Next.js Setup:
With native
We checked both Typesense and PostgreSQL metrics and saw no increase in request volume during these periods, so this does not appear to be prefetch amplification or request-volume saturation. Instead, requests initiated through the prefetch rendering path appeared to remain stalled until their respective timeouts. Typesense produced a client-side 24-second timeout, while PostgreSQL considered a normally fast indexed query active until its server-side This suggests the issue may concern the lifecycle or scheduling of third-party async I/O during staged prefetch rendering, rather than Next.js simply issuing more requests. The initial rollout was not a clean version comparison because it also replaced our custom Link wrapper (which defaults to I then tested these combinations more carefully:
This isolates the trigger to the prefetch path rather than canary generally. What seems unexpected is that Partial Prefetching should only prepare the reusable App Shell and defer uncached dynamic data until navigation. Our expensive work is asynchronous and rendered behind One possible explanation is that rendering the shell invokes third-party async functions to discover where they suspend. The Typesense/PostgreSQL operation may already have started by the time React observes the pending Promise, and the external work might continue even if that render is abandoned. Another possibility is a regression in the new staged/cached-navigation behavior. The new Is shell prefetch expected to invoke this kind of third-party async I/O up to its first suspension? If so, should |
|
There seems to be a bug with instant navigation in When I try to perform a client navigation, I keep getting a bunch of errors like the following: From what I can tell, all the modules that it reports are client components. However, if I perform a page reload on the page, then attempt to perform client navigation to that page again, the error disappeared, so I assume that's because the page reload did a prerendering caching. For context of what I have in the code:
I recorded a video to showcase the bug, because the video it too large, so I have host it externally🙏 Feel free to ask me for error traces. |
|
16.3 feels much faster locally! I have a question about cacheComponents / partialPrefetching. Suppose I have two pages, each with a different header. How can I achieve an experience where soft navigation between those pages doesn't trigger Suspense again when cacheComponents is enabled? If I wrap the header in Suspense, a soft navigation causes it to suspend again, even though we already have the auth and user data. I'm trying to understand the intended pattern here. Given that my headers depend on cookies and authentication, should I be using instant = false for this use case? I am open to not using react-query too if there is an example of this. thanks! import { dehydrateQueryClient } from '@/features/shared/utils/dataFetching/reactQuery/dehydrateQueryClient'
import { getServerQueryClient } from '@/features/shared/utils/dataFetching/reactQuery/ServerQueryClient'
import { HydrationBoundary } from '@tanstack/react-query'
import { cookies } from 'next/headers'
import { Suspense } from 'react'
const userQueryOptions = {
queryKey: ['user'],
queryFn: async () => {
const res = await fetch('https://api.example.com/user')
return res.json()
},
}
export default async function PageA() {
const cookiesStore = await cookies()
const queryClient = await getServerQueryClient()
const auth = await fetchAuth(cookiesStore)
if (auth) {
await queryClient.prefetchQuery(userQueryOptions)
}
return (
<HydrationBoundary state={dehydrateQueryClient(queryClient)}>
{/* Header also renders UI based on auth and user */}
<HeaderA />
<Suspense fallback={<div>Loading...</div>}>
<Content />
</Suspense>
</HydrationBoundary>
)
}
export default async function PageB() {
const cookiesStore = await cookies()
const queryClient = await getServerQueryClient()
const auth = await fetchAuth(cookiesStore)
if (auth) {
void queryClient.prefetchQuery(userQueryOptions)
}
return (
<HydrationBoundary state={dehydrateQueryClient(queryClient)}>
{/* Header also renders UI based on auth and user */}
<HeaderB />
<Suspense fallback={<div>Loading...</div>}>
<Content />
</Suspense>
</HydrationBoundary>
)
}
// some client component
'use client'
const Content = () => {
const { data: user } = useQuery(userQueryOptions)
return <div>{user?.id}</div>
} |
Would be great if the
|
|
Rust React Compiler OOM-kills builds of larger apps on Vercel's standard build containers We bisected the cause:
So the marginal memory cost of the Rust compiler pass over a larger component count exceeds the standard build container's RAM. Workaround we shipped: It would be great if the Rust compiler pass could bound its memory (or document a machine-size requirement) — as shipped, enabling the headline experimental feature on the platform's own standard containers is a build-killer for non-trivial apps. |
|
@icyJoseph — picking this up as you asked in #96099. Apologies for the delay; we had downgraded and the problem went quiet until 16.3.0 stable brought it back. Full write-up with the template filled in is now at #96650; here is the version with the extra stack and library detail you asked for. What happensEvery Vercel production serverless function whose bundle pulls in our large authenticated module graph fails at module load, before any application code runs: That is the whole stack — every frame is the Vercel Node bootstrap (
Version matrix — a regression we have hit twice
Both times the fix was a Working vs broken
Deterministic across 3 separate builds; redeploys never help; rollback to a pre-upgrade deployment fixes it instantly. Environment
Libraries and config, since you askedConfig flags in play:
Heavier things in the server graph: One observation that may matterThe entire stack is Vercel's bytecode-caching layer, and per Vercel's own blog / changelog that layer is enabled by default for Node 20+ CommonJS functions and applies to production deployments only. Every crash we have seen is on a production function. To be clear about what is and isn't established: I have not yet run a controlled preview-vs-production comparison on the same 16.3.0 build, so treat the production-only boundary as a hypothesis, not a finding. It is the first thing I am testing. If this turns out to be a Vercel runtime issue rather than a Next.js one, that is a perfectly good outcome — but the trigger is precisely and only the What we already ruled out
What I can give youA public minimal reproduction is the one thing I can't hand over — private monorepo, and the trigger appears to involve the scale of the emitted server output plus a production-only runtime layer, so "minimal" is somewhat self-defeating. Instead:
Tell me which is most useful and I'll turn it around quickly. |
This comment has been hidden.
This comment has been hidden.
Cache Components:
|




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Note
Next 16.3 is now stable!
Read the release blog post, https://nextjs.org/blog/next-16-3
Use this discussion to report any feedback or bugs you find in the 16.3 Preview release!
All reactions