status
stringclasses
1 value
repo_name
stringclasses
13 values
repo_url
stringclasses
13 values
issue_id
int64
1
104k
updated_files
stringlengths
11
1.76k
title
stringlengths
4
369
body
stringlengths
0
254k
βŒ€
issue_url
stringlengths
38
55
pull_url
stringlengths
38
53
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
unknown
language
stringclasses
5 values
commit_datetime
unknown
closed
vercel/next.js
https://github.com/vercel/next.js
50,791
["packages/next/src/build/index.ts"]
Build failing for edge api functions when using outputFileTracingExcludes
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:19 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6020 Binaries: Node: 20.2.0 npm: 9.6.6 Yarn: N/A pnpm: 8.5.1 Relevant packages: next: 13.4.5-canary.5 eslint-config-next: 13.4.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) Middleware / Edge (API routes, runtime) ### Link to the code that reproduces this issue or a replay of the bug https://github.com/diginikkari/og-app ### To Reproduce Reproduce with linked repo: ``` git clone https://github.com/diginikkari/og-app cd og-app npm install npm run build ``` Reproduce manually: Add api route with "edge" -config: ``` // src/pages/api/static.tsx export const config = { runtime: 'edge', }; export default function handler() { return { title: 'Hello, world!', }; } ``` Add **outputFileTracingExcludes** to `next.config.json`: ``` experimental: { outputFileTracingExcludes: { '**/*': ['node_modules/**/@swc/core*'], }, // See https://github.com/vercel/next.js/issues/42641#issuecomment-1320713368 }, ``` run build `npm run build` ### Describe the Bug There is build error: ``` > Build error occurred [Error: ENOENT: no such file or directory, open '/private/tmp/og-app/.next/server/pages/api/static.js.nft.json'] { errno: -2, code: 'ENOENT', syscall: 'open', path: '/private/tmp/og-app/.next/server/pages/api/static.js.nft.json' } ``` There is old closed issue #41395 regarding same error. ### Expected Behavior Build should succeed without error. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/50791
https://github.com/vercel/next.js/pull/50808
3427d324d8cb3fc51d6f1a346085b918d929127c
2bd76827f09bbd9c60ac87af0d8f48e815272ea3
"2023-06-05T11:56:19Z"
javascript
"2023-06-14T04:04:10Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,658
["packages/next/src/build/webpack-config.ts", "test/e2e/app-dir/actions/app-action.test.ts", "test/e2e/app-dir/actions/app/client/actions-lib.js", "test/e2e/app-dir/actions/app/client/page.js"]
[NEXT-1290] getServerSession in ServerAction
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 18.12.1 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.5-canary.3 eslint-config-next: 13.4.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue or a replay of the bug https://github.com/bfourgeaud/server-actions-session-repro ### To Reproduce 1 - Login (with any credentials) 2 - Click "Server Action" button 3 - See error on server side (terminal) ### Describe the Bug Whenever I try to use `getServerSession `from `next-auth` in a server action, the server throws an error : **`Error: Invariant: Method expects to have requestAsyncStorage, none available`** On the other hand, on any other server component (home page of reproduction for example), there is no problem retrieving the current session. ### Expected Behavior It should be possible to retrieve session information in server-actions the same way we retrieve them in any server-component. ### Which browser are you using? (if relevant) chrome ### How are you deploying your application? (if relevant) next dev <sub>[NEXT-1290](https://linear.app/vercel/issue/NEXT-1290/getserversession-in-serveraction)</sub>
https://github.com/vercel/next.js/issues/50658
https://github.com/vercel/next.js/pull/51367
3cac09790b07038ad7c48a842dfe22e3468cf257
46981388aad0a1b0f17f35de0c6794f4572d7549
"2023-06-01T20:16:15Z"
javascript
"2023-06-16T13:47:48Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,585
["packages/next/src/client/components/app-router.tsx", "packages/next/src/client/components/react-dev-overlay/hot-reloader-client.tsx", "packages/next/src/client/components/react-dev-overlay/internal/ReactDevOverlay.tsx", "packages/next/src/client/components/react-dev-overlay/internal/error-overlay-reducer.ts", "packages/next/src/client/components/react-dev-overlay/internal/helpers/use-websocket.ts", "test/e2e/app-dir/not-found/app/not-found.js", "test/e2e/app-dir/not-found/not-found.test.ts"]
[NEXT-1299] Not-found.js route refreshes every 3-4 seconds on development server
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 Binaries: Node: 16.14.0 npm: 8.3.1 Yarn: N/A pnpm: 7.27.0 Relevant packages: next: 13.4.5-canary.2 eslint-config-next: 13.4.1 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue or a replay of the bug https://github.com/JasonA-work/next13-not-found-bug ### To Reproduce Run "npm run dev". And navigate to /xyz or other non-existent paths. Wait for a few seconds, and you should see the refreshes / reloads happen. You can also bring up the network tab of the dev tools to verify that resources are being fetched / loaded again. ### Describe the Bug In the development server, when we land on the not-found route, after every few seconds, the page refreshes. ### Expected Behavior The page shouldn't be refreshing. ### Which browser are you using? (if relevant) Seems to happen consistently on all major browsers. ### How are you deploying your application? (if relevant) Vercel <sub>[NEXT-1299](https://linear.app/vercel/issue/NEXT-1299/not-foundjs-route-refreshes-every-3-4-seconds-on-development-server)</sub>
https://github.com/vercel/next.js/issues/50585
https://github.com/vercel/next.js/pull/51637
a9870df101641ea8d715852b3b566d214a9c5f3c
c98d2b927d83f3511fe9a2b9246fcdb51d02a446
"2023-05-31T10:58:14Z"
javascript
"2023-06-23T23:30:48Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,555
["packages/next/src/build/index.ts", "test/integration/with-router/test/index.test.js"]
[BUG] Static Rendering build times increase 300+% in 13.2.5-canary.26
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 16.13.0 npm: 8.1.0 Yarn: 1.22.18 pnpm: N/A Relevant packages: next: 13.4.5-canary.2 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 4.9.5 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), SWC transpilation, Turbopack (--turbo) ### Link to the code that reproduces this issue or a replay of the bug https://github.com/vercel/next.js/compare/v13.2.5-canary.25...v13.2.5-canary.26 ### To Reproduce The test to reproduce is to create ~400 statically generated pages with resources pulled dynamically from a CMS api to generate the `slug` parameter props. To isolate the problem for this test I am only: - statically generating one specific app directory page (`CompanyPage`) - fetching the resource, but - not rendering anything more than a single `<div>` ``` export default async function CompanyPage(context: PageContext) { const { params: { slug }, } = context const company = await getCompany(slug) return <div>STATIC</div> } ``` My next config has also been stripped to its most basic form: ``` const nextConfig = { experimental: { appDir: true, }, } ``` `npm run build` ### Describe the Bug `13.2.5-canary.25` 400 pages build times: 35-40 seconds, (5 times reproduced) `13.2.5-canary.26` 400 pages build times: 140-160 seconds, (5 times reproduced) The increase in build time is 3-4x. For our production workloads, this makes production builds and deploys untenable when leading into hours of time at thousands of statically generated pages. Please note: in the latest canary, `13.4.5-canary.2` the build times have decreased slightly, but still hovering around 2x-3x the build time of `13.2.5-canary.25` Possibly Related: https://github.com/vercel/next.js/issues/46884 ### Expected Behavior The bug expectation is to maintain consistent build times with no configuration changes. ### Which browser are you using? (if relevant) n/a ### How are you deploying your application? (if relevant) Vercel
https://github.com/vercel/next.js/issues/50555
https://github.com/vercel/next.js/pull/51271
862f556c69b05b4c5d5701028818ed5707da3b30
f676d001b66d1e2d2ef9098ab4f2998e5f10294d
"2023-05-30T22:30:32Z"
javascript
"2023-06-14T06:23:50Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,492
["packages/next/src/build/webpack-config.ts", "test/e2e/app-dir/with-babel/middleware.js", "test/e2e/app-dir/with-babel/with-babel.test.ts"]
Using a `babel.config.js` file gives error when having a middleware containing `NextResponse.redirect()`
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000 Binaries: Node: 18.12.1 npm: 8.19.2 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.4.5-canary.0 eslint-config-next: 13.4.3 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue or a replay of the bug https://github.com/athoteldev/vercel-function-test/tree/middleware-issue ### To Reproduce 1. create a new Next.js project. 2. add a `babel.config.js` file: ```js const plugins = [] module.exports = { presets: ['next/babel'], plugins, } ``` 3. add a middleware.ts in the root of the project: ```ts import { NextRequest, NextResponse } from 'next/server' export async function middleware(request: NextRequest) { if (false) { // just for demo purposes return NextResponse.redirect(new URL('/some-page', request.url)) } } ``` 4. push the changes and the Vercel build and deploy. 5. notice the error message: ``` Error: The Edge Function "middleware" is referencing unsupported modules: -- 16:01:31.675 | - index.js: ./resvg.wasm?module, ./yoga.wasm?module 16:01:33.773 | NOW_SANDBOX_WORKER_EDGE_FUNCTION_UNSUPPORTED_MODULES: The Edge Function "middleware" is referencing unsupported modules: - index.js: ./resvg.wasm?module, ./yoga.wasm?module ``` ![image](https://github.com/vercel/next.js/assets/4083652/0512e4a9-ee6c-4d06-8196-9243e4434798) ### Describe the Bug I am getting an error when Vercel is trying to build the project. To notice that removing any of these two files: `babel.config.js` or `middleware.ts`, will make the project build successfully. The project also build successfully if I remove the ".redirect()" from the `middleware.ts` file. But I can't do that with my real project because I have specific configuration. ### Expected Behavior To not get any errors in Vercel when it's building the project ### Which browser are you using? (if relevant) - ### How are you deploying your application? (if relevant) Vercel
https://github.com/vercel/next.js/issues/50492
https://github.com/vercel/next.js/pull/51067
804552590e46c64894d66c91a7f088215a64bc4d
2bc10616096500ff7664d25d16695f640beb8538
"2023-05-29T13:12:36Z"
javascript
"2023-06-09T20:33:14Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,489
["packages/next/src/server/lib/start-server.ts", "packages/next/src/server/lib/utils.ts", "packages/next/src/server/lib/worker-utils.ts"]
Upgrade next from 13.4.3 to 13.4.4 startup crash, because of websocket error in dev mode due to NODE_OPTIONS='--inspect'
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:35 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T8103 Binaries: Node: 19.6.0 npm: 9.4.0 Yarn: 1.22.19 pnpm: 8.4.0 Relevant packages: next: 13.4.5-canary.0 eslint-config-next: 13.4.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue or a replay of the bug https://github.com/julianklumpers/reproduction-app ### To Reproduce - yarn dev - npm run dev - pnpm dev ### Describe the Bug In the release log of 13.4.4 is a commit that says `NODE_OPTIONS='--inspect'` is fixed, see: - fix: NODE_OPTIONS='--inspect' in next dev for debugging: https://github.com/vercel/next.js/pull/48019 Passing `NODE_OPTIONS='--inspect'` causes a websocket error and the app cannot start. ### Expected Behavior Running dev with NODE_OPTIONS='--inspect' starts the app without websocket error and inspect mode works correctly. ### Which browser are you using? (if relevant) Google Chrome Version 113.0.5672.92 ### How are you deploying your application? (if relevant) Digital Ocean
https://github.com/vercel/next.js/issues/50489
https://github.com/vercel/next.js/pull/51467
cb7be1912f9544dd6fb97a929211b71dd0aece31
70aad4a2b5b34fbbae006c477f96c54118da6381
"2023-05-29T10:39:34Z"
javascript
"2023-06-25T22:31:09Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,445
["packages/next-swc/crates/core/src/server_actions.rs", "packages/next-swc/crates/core/tests/fixture/server-actions/server/5/input.js", "packages/next-swc/crates/core/tests/fixture/server-actions/server/5/output.js"]
[NEXT-1254] Shorthand notation not working in actions
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 Binaries: Node: 16.17.0 npm: 8.15.0 Yarn: 1.22.17 pnpm: 7.14.2 Relevant packages: next: 13.4.5-canary.0 eslint-config-next: 13.4.3 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue or a replay of the bug https://github.com/thanosoncode/next-blog/blob/master/app/page.tsx ### To Reproduce Create a List component that renders a list and a DeleteForm that handles item delete using actions. ``` const List = async () => { const posts = (await prisma.post.findMany()) as Post[]; return ( <div className="flex flex-col gap-12"> <div> <h1 className="text-2xl mb-8">All posts</h1> <section className="flex flex-col gap-3"> {posts.map((post) => ( <div key={post.id} className="flex gap-4 justify-between items-start" > <Link href={`/posts/${post.id}`} className="block underline"> {post.title} </Link> {/* @ts-expect-error Server Component */} <DeleteForm id={post.id} /> </div> ))} </section> </div> </div> ); }; ``` ``` const DeleteForm = async ({ id }: { id: string }) => { const deletePost = async () => { "use server"; await prisma.post.delete({ where: { id } }); revalidatePath("/"); }; return ( <form action={deletePost}> <button className="text-sm" type="submit"> delete </button> </form> ); }; ``` ### Describe the Bug If **shorthand** notation is used in: `await prisma.post.delete({ where: { id } });` we get an unhandledError `Error: id is not defined` If **explicit** notation is used in: `await prisma.post.delete({ where: { id : id } });` everything works as expected https://github.com/vercel/next.js/assets/74588018/c4cd1234-d2b7-4c75-86b7-2d51255d378d ### Expected Behavior Shorthand notation to work in actions. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1254](https://linear.app/vercel/issue/NEXT-1254/shorthand-notation-not-working-in-actions)</sub>
https://github.com/vercel/next.js/issues/50445
https://github.com/vercel/next.js/pull/50937
e562ddf990f6190459473d773eff171c6b1c14f2
18d2f7da33145c359724153b018e8ab943e65613
"2023-05-28T08:24:26Z"
javascript
"2023-06-08T03:03:54Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,364
["packages/next/src/server/lib/render-server-standalone.ts", "packages/next/src/server/lib/start-server.ts", "packages/next/src/server/next-server.ts"]
Abort Signal Not Working with Next.js Edge Functions
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 18.15.0 npm: 9.5.0 Yarn: N/A pnpm: 7.18.2 Relevant packages: next: 13.4.4-canary.13 eslint-config-next: 13.4.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 warn - Latest canary version not detected, detected: "13.4.4-canary.13", newest: "13.4.4". Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue. Read more - https://nextjs.org/docs/messages/opening-an-issue ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) Middleware / Edge (API routes, runtime) ### Link to the code that reproduces this issue or a replay of the bug https://github.com/Fawwaz-2009/demo-abort-signal-not-working-in-edge-function ### To Reproduce 1. Clone and run the application. 2. Visit the main page, navigate to the fetch or EventSource demo. 3. Press the "Stop Stream" button, which triggers an abort on the request. 4. Observe the console logs on the server to sea the streaming not stoping. ### Describe the Bug when we use EventSource and fetch with AbortController. Simply put, the 'abort' event that's part of the request.signal in the edge function isn't firing like it should. ### Expected Behavior Normally, if a request gets cancelled from the client side, the 'abort' signal in the edge function should light up. This helps stop any work related to the request on the server-side, which is good for keeping things running smoothly. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/50364
https://github.com/vercel/next.js/pull/51594
f59710e907c01ab57730eec0ae571dfff80f49fa
b714ac55c113bbb387b2501ec968028a2637acb4
"2023-05-26T04:41:09Z"
javascript
"2023-06-22T00:43:31Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,312
["packages/next/src/build/webpack-config.ts", "test/e2e/app-dir/app-alias/app-alias.test.ts", "test/e2e/app-dir/app-alias/next.config.js", "test/e2e/app-dir/app-alias/src/pages/aaa.js", "test/e2e/app-dir/app-alias/tsconfig.json"]
[NEXT-1235] Build size increased a lot since version 13.4.4-canary.2
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023 Binaries: Node: 18.14.2 npm: 9.5.0 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.4.4-canary.2 eslint-config-next: 13.4.3 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue or a replay of the bug https://codesandbox.io/p/sandbox/build-size-increased-a-lot-1f3wbj ### To Reproduce in version 13.4.4-canary.1, build size is normal ``` Route (app) Size First Load JS ─ β—‹ / 141 B 77.2 kB + First Load JS shared by all 77.1 kB β”œ chunks/139-de01d39b7894378c.js 24.7 kB β”œ chunks/2443530c-d4a6bd7fc7f21e3c.js 50.5 kB β”œ chunks/main-app-86b9b326f9ccb644.js 211 B β”” chunks/webpack-8074fabf81ca3fbd.js 1.61 kB Route (pages) Size First Load JS ─ β—‹ /404 178 B 83.8 kB + First Load JS shared by all 83.6 kB β”œ chunks/main-bbf9124d48654571.js 81.8 kB β”œ chunks/pages/_app-c544d6df833bfd4a.js 192 B β”” chunks/webpack-8074fabf81ca3fbd.js 1.61 kB ``` when update to 13.4.4-canary.2 or later, build size increased a lot ``` Route (app) Size First Load JS ─ β—‹ / 145 B 122 kB + First Load JS shared by all 122 kB β”œ chunks/2443530c-d4a6bd7fc7f21e3c.js 50.5 kB β”œ chunks/488-441ec15fc214c3f1.js 24.7 kB β”œ chunks/framework-6f53985fc108c1c2.js 45.1 kB β”œ chunks/main-app-cee8edc8d4289322.js 218 B β”” chunks/webpack-8074fabf81ca3fbd.js 1.61 kB Route (pages) Size First Load JS ─ β—‹ /404 181 B 74.7 kB + First Load JS shared by all 74.5 kB β”œ chunks/framework-6f53985fc108c1c2.js 45.1 kB β”œ chunks/main-5f68985cd09b61f4.js 27.6 kB β”œ chunks/pages/_app-b555d5e1eab47959.js 195 B β”” chunks/webpack-8074fabf81ca3fbd.js 1.61 kB ``` ### Describe the Bug build size increased a lot ### Expected Behavior reduce build size ### Which browser are you using? (if relevant) Chrome 112.0.5615.121 ### How are you deploying your application? (if relevant) next start <sub>[NEXT-1235](https://linear.app/vercel/issue/NEXT-1235/build-size-increased-a-lot-since-version-1344-canary2)</sub>
https://github.com/vercel/next.js/issues/50312
https://github.com/vercel/next.js/pull/50324
46369f574665bc2616f2220f7146c9644c4f61dc
8725b6c376703e70b7b7deb0773d4a3bfa1446fe
"2023-05-25T02:10:17Z"
javascript
"2023-05-25T12:10:02Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,307
["packages/next/src/client/legacy/image.tsx", "test/e2e/app-dir/next-image/app/legacy-edge-runtime/layout.js", "test/e2e/app-dir/next-image/app/legacy-edge-runtime/page.js", "test/e2e/app-dir/next-image/app/legacy/layout.js", "test/e2e/app-dir/next-image/app/legacy/page.js", "test/e2e/app-dir/next-image/next-image.test.ts"]
[NEXT-1237] Legacy Image component is incompatible with edge runtime on dev server
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 16.15.1 npm: 8.12.1 Yarn: 1.22.19 pnpm: 8.5.0 Relevant packages: next: 13.4.4-canary.8 eslint-config-next: 13.4.4-canary.8 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Image optimization (next/image, next/legacy/image), Middleware / Edge (API routes, runtime) ### Link to the code that reproduces this issue or a replay of the bug https://github.com/8bit-echo/next-legacy-image ### To Reproduce 1. Add `export const runtime = 'experimental-edge';` in layout.tsx 2. Use the <Image> component from 'next/legacy/image' 3. Start dev server ### Describe the Bug When experimental edge runtime is used with dev server, an internal server error is triggered with the following message/stack trace: ``` ./node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/micromatch/index.js:22:3426 Module not found: Can't resolve 'path' Import trace for requested module: ./node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/shared/lib/match-remote-pattern.js ./node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/client/legacy/image.js ``` ### Expected Behavior `<Image />` should still render. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1237](https://linear.app/vercel/issue/NEXT-1237/legacy-image-component-is-incompatible-with-edge-runtime-on-dev-server)</sub>
https://github.com/vercel/next.js/issues/50307
https://github.com/vercel/next.js/pull/50343
5d9597879c46b383d595d6f7b37fd373325b7544
68b34de96ec122245dca324e16843280eef540c4
"2023-05-24T21:37:57Z"
javascript
"2023-05-26T11:38:10Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,243
["packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts", "test/e2e/app-dir/rsc-basic/app/dynamic/_dynamic.js", "test/e2e/app-dir/rsc-basic/app/dynamic/page.js", "test/e2e/app-dir/rsc-basic/rsc-basic.test.ts"]
[NEXT-1231] This is probably a bug in the React Server Components bundler.
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 18.16.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.3 eslint-config-next: 13.4.3 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 warn - Latest canary version not detected, detected: "13.4.3", newest: "13.4.4-canary.6". Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue. Read more - https://nextjs.org/docs/messages/opening-an-issue ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue or a replay of the bug npx create-next-app --example reproduction-template-app-dir reproduction-app ### To Reproduce When attempting to generate a new Next.js project using the command `npx create-next-app@latest`, **I encountered an error in app-router.js# related to the React Client Manifest.** This error is likely due to a bug in the React Server Components bundler, which was triggered after running the `npm run dev` command. ![image](https://github.com/vercel/next.js/assets/109562935/9a5554c3-65c8-4c05-be28-8afc502f5110) ### Describe the Bug ![image](https://github.com/vercel/next.js/assets/109562935/e138e9a6-69fe-410c-b537-3d16b20d4b8e) ### Expected Behavior Generate a new Next.js app with the latest features ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1231](https://linear.app/vercel/issue/NEXT-1231/this-is-probably-a-bug-in-the-react-server-components-bundler)</sub>
https://github.com/vercel/next.js/issues/50243
https://github.com/vercel/next.js/pull/52795
80572b373ff32031838b0ba0916aa834584599a6
7e9627a39087732fda61576e14aa1a5f485756d2
"2023-05-24T02:12:38Z"
javascript
"2023-07-17T17:41:04Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,232
["packages/next/src/build/utils.ts", "packages/next/src/server/lib/render-server-standalone.ts", "test/e2e/app-dir/app/app/dashboard/not-found.js", "test/production/standalone-mode/required-server-files/app/not-found.js", "test/production/standalone-mode/required-server-files/next.config.js", "test/production/standalone-mode/required-server-files/required-server-files-app.test.ts"]
[NEXT-1260] /app/not-found broken in standalone mode
### Verify canary release * [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ``` Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000 Binaries: Node: 18.15.0 npm: 9.5.0 Yarn: 1.22.19 pnpm: 8.3.1 Relevant packages: next: 13.4.8-canary.1 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: N/A ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Standalone mode (output: "standalone") ### Link to the code that reproduces this issue or a replay of the bug [https://github.com/klarstrup/next.js-repro-repo/tree/ERR_PACKAGE_PATH_NOT_EXPORTED](https://github.com/klarstrup/next.js-repro-repo/tree/ERR_PACKAGE_PATH_NOT_EXPORTED) ### To Reproduce Build and run the app: `npm i && npm run build && node ./.next/standalone/server.js` Request any path on the server, [http://localhost:3000/](http://localhost:3000/) is a good choice. ### Describe the Bug any 404 page results in a bunch of failing script requests which result in ERR_PACKAGE_PATH_NOT_EXPORTED spam in server output: ``` Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports" in /next.js-repro-repo/.next/standalone/node_modules/react-dom/package.json at new NodeError (node:internal/errors:399:5) at exportsNotFound (node:internal/modules/esm/resolve:361:10) at packageExportsResolve (node:internal/modules/esm/resolve:697:9) at resolveExports (node:internal/modules/cjs/loader:565:36) at Module._findPath (node:internal/modules/cjs/loader:634:31) at Module._resolveFilename (node:internal/modules/cjs/loader:1061:27) at /Users/io/code/my-app/.next/standalone/node_modules/next/dist/server/require-hook.js:196:36 at Module._load (node:internal/modules/cjs/loader:920:27) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) { code: 'ERR_PACKAGE_PATH_NOT_EXPORTED' } ``` ### Expected Behavior no failing script requests and ERR_PACKAGE_PATH_NOT_EXPORTED spam in server output ### Which browser are you using? (if relevant) *No response* ### How are you deploying your application? (if relevant) *No response* <sub>From [SyncLinear.com](https://synclinear.com) | [NEXT-1260](https://linear.app/vercel/issue/NEXT-1260/appnot-found-broken-in-standalone-mode)</sub>
https://github.com/vercel/next.js/issues/50232
https://github.com/vercel/next.js/pull/51172
8a11835fbe71c085da009d98198798deab8e9f09
9d0129c635d71f56e57554abf7e0596978e3a7bb
"2023-05-23T18:56:57Z"
javascript
"2023-06-12T21:14:32Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,227
["docs/index.mdx"]
Docs: Grammatical Error on the Introduction page.
### What is the improvement or update you wish to see? The Introduction Page of the Docs has a missing conjuction 'and'. I wanted to fix this but was unable to find the .md file corresponding to the Docs of that page. The URL of the page is https://nextjs.org/docs ### Is there any context that might help us understand? ![image](https://github.com/vercel/next.js/assets/93083303/ad98d2ed-c54b-4673-985a-dac1b3c32eb5) In the Second Paragraph "At the top of the sidebar, you'll notice a dropdown menu that allows you to switch between the App Router the Pages Router features" There is a missing 'and' . It should look like this "At the top of the sidebar, you'll notice a dropdown menu that allows you to switch between the App Router **and** the Pages Router features" ### Does the docs page already exist? Please link to it. https://nextjs.org/docs
https://github.com/vercel/next.js/issues/50227
https://github.com/vercel/next.js/pull/51058
83860091a61d8efd9bbb83ec89dfd6618c9559da
e797546ee316cf413208da7b8232a92ae1a4294d
"2023-05-23T17:57:33Z"
javascript
"2023-06-10T13:15:02Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,225
["packages/next/src/build/webpack-config.ts", "test/e2e/app-dir/rsc-basic/app/app-react/client-react.js", "test/e2e/app-dir/rsc-basic/app/app-react/page.js", "test/e2e/app-dir/rsc-basic/rsc-basic.test.ts"]
Module not found: Can't resolve 'react-dom/server' 13.4.4-canary.4
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash 13.4.4-canary.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue or a replay of the bug no response ### To Reproduce 13.4.4-canary.4 ### Describe the Bug Module not found: Can't resolve 'react-dom/server' ### Expected Behavior resolve the react package correctly ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/50225
https://github.com/vercel/next.js/pull/50238
ec8bf53907b7b8e60e1100979a2ed267298696d9
130fe65bdea4ad7608a70925d2c8573a393643aa
"2023-05-23T17:18:18Z"
javascript
"2023-05-23T23:00:59Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,141
["docs/02-app/02-api-reference/02-file-conventions/01-metadata/opengraph-image.mdx"]
Docs: The example of open-graph image using external data to generate the image under JavaScript is missing
### What is the improvement or update you wish to see? I would like to see more examples for the JavaScript version of open-graph image generation using external url or data source. So far, the doc is okay under TypeScript version: ---- ![CleanShot 2023-05-22 at 11 44 14](https://github.com/vercel/next.js/assets/18704345/88489bb6-2234-44cf-9f4b-ae21676e7381) ---- However, When I switch to the JavaScript version, the example is missing like so: ![CleanShot 2023-05-22 at 11 43 45](https://github.com/vercel/next.js/assets/18704345/420ce01a-31fc-4393-8f75-163e002d71ba) ---- ### Is there any context that might help us understand? All of the open-graph generation documentation is under App Router. The missing example is JavaScript version. ### Does the docs page already exist? Please link to it. https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image#using-external-data
https://github.com/vercel/next.js/issues/50141
https://github.com/vercel/next.js/pull/50996
1be0bdd081b56097aeb08c5f326158277df57f36
9c4b0ec9e90127bcf145c0120f0d285b13b3c129
"2023-05-22T03:47:27Z"
javascript
"2023-06-08T21:29:47Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,129
["packages/next/src/build/utils.ts", "test/e2e/app-dir/app/index.test.ts"]
Incorrect bundle/first load size for route groups in build logs
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023 Binaries: Node: 16.17.0 npm: 8.15.0 Yarn: 1.22.19 pnpm: 7.1.0 Relevant packages: next: 13.0.8-canary.0 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), CLI (create-next-app) ### Link to the code that reproduces this issue or a replay of the bug https://codesandbox.io/p/sandbox/sleepy-tom-km83c3?file=%2Fapp%2F%28foo%29%2Fbar%2Fpage.tsx%3A7%2C2 ### To Reproduce - Use a route group - Run `yarn build` - See that the outputted bundle size log always returns `0b` for pages under a route group ### Describe the Bug The bundle size and first load logs that are output during build are incorrect for pages under a route group. They will always return `0b` <img width="629" alt="image" src="https://github.com/vercel/next.js/assets/93682696/c1142fc2-5499-468b-a1e4-cd4fdfffe16c"> ### Expected Behavior Calculate the size and first load js correctly ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/50129
https://github.com/vercel/next.js/pull/50768
c76653f2f7c20dd9e2dd6ba561c34bf742f024c2
d492b937e216f0f193bf4d9c233424e808e049d1
"2023-05-21T17:19:34Z"
javascript
"2023-06-14T21:24:57Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,099
["packages/next/src/build/webpack-config.ts", "test/e2e/app-dir/actions/app-action.test.ts", "test/e2e/app-dir/actions/app/client/edge/page.js"]
[NEXT-1229] Error with `cookies.set()` in server actions on edge runtime : `Error: Invariant: Method expects to have requestAsyncStorage, none available`
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Tue Apr 25 04:07:22 PDT 2023; root:xnu-8796.121.2~8/RELEASE_ARM64_T8103 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: 1.22.18 pnpm: 8.5.0 Relevant packages: next: 13.4.4-canary.0 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Data fetching (gS(S)P, getInitialProps) ### Link to the code that reproduces this issue or a replay of the bug https://github.com/Fredkiss3/next-bug-server-actions-headers-cookies ### To Reproduce 1. Clone the repo, install the deps, run `npm run dev` and open the browser 2. Try clicking on any of the buttons 3. You will have an error `"Error: Invariant: Method expects to have requestAsyncStorage, none available"` ### Describe the Bug this issue is the same as this one #49235, it has been fixed in `[email protected]`, but it still happens when using edge runtime. > Having a component that has the directive 'use client', which then imports an action that has the directive 'use server', will result in an error stating that `Invariant: Method expects to have requestAsyncStorage, none available`, When invoked from a form. ### Expected Behavior Using cookies & headers in server actions in edge runtime should work normally ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1229](https://linear.app/vercel/issue/NEXT-1229/error-with-cookiesset-in-server-actions-on-edge-runtime-error)</sub>
https://github.com/vercel/next.js/issues/50099
https://github.com/vercel/next.js/pull/51348
a806f1ad843e05b4ca63e477a33d89dc8c683ea3
7d7d5a762dc9df2fbae11d6e598695c12cc3428f
"2023-05-20T15:33:47Z"
javascript
"2023-06-15T13:03:51Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,096
["packages/eslint-plugin-next/src/rules/no-before-interactive-script-outside-document.ts", "test/unit/eslint-plugin-next/no-before-interactive-script-outside-document.test.ts"]
Docs: Update eslint document for Script Component on strategy 'beforeInteractive'
### What is the improvement or update you wish to see? Since we moved on from `Page Router` to `App Router`, eslint should not show a lint about `pages/_document.js` if it is on `App Router`. When using the Script component inside `page.tsx` with strategy `beforeInteractive`, > `next/script`'s `beforeInteractive` strategy should not be used outside of `pages/_document.js`. The example from the [docs](https://nextjs.org/docs/app/api-reference/components/script#strategy) for Script Components in `App Router` shows that the Script Component is in the `page.tsx`. ### Is there any context that might help us understand? ![Screenshot 2023-05-20 at 11 44 28 PM](https://github.com/vercel/next.js/assets/120007119/d3d0cf05-fb3b-4603-8333-bb3551225ee8) ![Screenshot 2023-05-20 at 11 02 55 PM](https://github.com/vercel/next.js/assets/120007119/d9efcce4-16cd-4ade-8430-a0aa67688a4e) ![Screenshot 2023-05-20 at 11 02 25 PM](https://github.com/vercel/next.js/assets/120007119/7cda9bba-2b1e-4b76-9a3d-9067015e765c) ### Does the docs page already exist? Please link to it. https://nextjs.org/docs/app/api-reference/components/script#strategy
https://github.com/vercel/next.js/issues/50096
https://github.com/vercel/next.js/pull/50261
62af2007ce78fdbff33013a8145efbcacbf6b8e2
2aa68ae287737151236e462ae73a290d13777b04
"2023-05-20T14:03:33Z"
javascript
"2023-05-26T16:27:42Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,087
["test/e2e/app-dir/actions/app-action.test.ts", "test/e2e/app-dir/actions/app/server/form.js"]
[NEXT-1228] Adding hidden form input at start of form overrides ACTION_ID when using server action
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023 Binaries: Node: 16.17.0 npm: 8.15.0 Yarn: 1.22.19 pnpm: 7.1.0 Relevant packages: next: 13.4.4-canary.0 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 4.9.5 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue or a replay of the bug https://codesandbox.io/p/sandbox/gracious-http-zqknr4 ### To Reproduce Create a form with a server action. Add a hidden input as the direct child of the form. ### Describe the Bug When adding a hidden form input at the start of a form, it appears twice in the DOM and the posted data to the server action. With it, the automatically inserted hidden `$ACTION_ID` seems to get overwritten. When moving the input to the bottom of the form, all is working fine. ``` <form action="" enctype="multipart/form-data" method="POST"> <input type="hidden" name="pathname" value="/"> <input type="hidden" name="pathname" value="/"> <input type="text" name="Enter your name"> <button type="submit">Submit</button> </form> ``` ### Expected Behavior ``` <form action="" enctype="multipart/form-data" method="POST"> <input type="hidden" name="$ACTION_ID_f9fae9b99644f9d4fb5dcdfdb8fb0e06af189eef"> <input type="hidden" name="pathname" value="/"> <input type="text" name="Enter your name"> <button type="submit">Submit</button> </form> ``` ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1228](https://linear.app/vercel/issue/NEXT-1228/adding-hidden-form-input-at-start-of-form-overrides-action-id-when)</sub>
https://github.com/vercel/next.js/issues/50087
https://github.com/vercel/next.js/pull/50978
9a9d095b54a67ca74c6c32a19df2debffd067089
b8e308f511f48882ebad301924ad54d48af70744
"2023-05-20T13:03:16Z"
javascript
"2023-06-08T17:25:56Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,049
["packages/next/src/server/web/spec-extension/adapters/request-cookies.ts", "test/e2e/app-dir/actions/app/header/actions.ts"]
[NEXT-1211] cookies().set() doesn't accept maxAge and other headers
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 Binaries: Node: 16.16.0 npm: 8.11.0 Yarn: 1.22.17 pnpm: N/A Relevant packages: next: 13.4.3 eslint-config-next: 13.4.3 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), TypeScript (plugin, built-in types) ### Link to the code that reproduces this issue or a replay of the bug https://github.com/soylemezali42/set-cookie-typescript ### To Reproduce Check setCookieMaxAge.ts file ```js 'use server'; import { cookies } from "next/dist/client/components/headers"; export default async function setCookieMaxAge() { cookies().set({ name: '_name', value: 'test', maxAge: 60 * 60 }) return Promise.resolve('ok') } ``` ### Describe the Bug We can't set the maxAge or other headers in server actions. We need to be able to do it according to the document. Also, we can't get the build. [Related Document](https://nextjs.org/docs/app/api-reference/functions/cookies#cookiessetname-value-options) ### Expected Behavior We need to able to set maxAge header without typescript error. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1211](https://linear.app/vercel/issue/NEXT-1211/cookiesset-doesnt-accept-maxage-and-other-headers)</sub>
https://github.com/vercel/next.js/issues/50049
https://github.com/vercel/next.js/pull/50052
26ea9c63336ad24c0b100c1fc637e97d77a425e0
d381d581cf364c25a332921956f913dd048d7852
"2023-05-19T13:59:24Z"
javascript
"2023-05-19T19:02:16Z"
closed
vercel/next.js
https://github.com/vercel/next.js
50,031
["packages/next/src/build/utils.ts", "packages/next/src/server/lib/patch-fetch.ts", "packages/next/src/server/node-polyfill-fetch.ts", "test/e2e/app-dir/app-static/app-static.test.ts", "test/e2e/app-dir/app-static/app/react-fetch-deduping-edge/page.js", "test/e2e/app-dir/app-static/app/react-fetch-deduping-node/page.js"]
[NEXT-1217] Auto deduping doesn't work with revalidate = 0
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Home Binaries: Node: 18.16.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.1 eslint-config-next: 13.4.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue or a replay of the bug https://codesandbox.io/p/sandbox/epic-darwin-t78er9?file=%2Fapp%2Fpage.tsx%3A6%2C1 ### To Reproduce 1. Create a server component that fetches the same data both in the Page and in `generateMetadata` 2. Make the page dynamic by exporting `const revalidate = 0` 3. Run the project, the data is fetched twice ### Describe the Bug The app router docs say that fetch is automatically deduped in server components and no use of React's `cache` function is necessary whatsoever. This is not true for dynamic pages that use `revalidate = 0`. ### Expected Behavior The request should be deduped and only one request to the data source should be made. ### Which browser are you using? (if relevant) Chrome ### How are you deploying your application? (if relevant) locally, Vercel <sub>[NEXT-1217](https://linear.app/vercel/issue/NEXT-1217/auto-deduping-doesnt-work-with-revalidate-=-0)</sub>
https://github.com/vercel/next.js/issues/50031
https://github.com/vercel/next.js/pull/50187
f56722c971fa83f5918352b08d12f9c5ce0fa2f8
f4bb4aa73c21b686c5a6f13face606e07cceb749
"2023-05-19T07:06:39Z"
javascript
"2023-05-22T23:13:02Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,979
["packages/next/src/server/app-render/app-render.tsx", "test/e2e/app-dir/metadata/metadata.test.ts"]
[NEXT-1207] Default viewport tag not generated for `not-found` pages.
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:58 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6020 Binaries: Node: 18.15.0 npm: 9.5.0 Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.2 eslint-config-next: 13.4.2 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Routing (next/router, next/navigation, next/link) ### Link to the code that reproduces this issue to-reproduce is simple enough :) and codesandbox breaks when I create a not-found.tsx file :( ### To Reproduce 1. `create-next-app` 2. Create a `not-found.tsx` page 3. Add `notFound()` to the top of your root page 4. Access `/` -> default viewport tag is there 5. Access `/does-not-exist` default viewport tag is missing ### Describe the Bug So far accessing a page `/does-not-exist` and one triggered by `notFound()` behave a little differently even though they both render the `not-found` page. It looks like a fix for broken [Link](https://github.com/vercel/next.js/pull/49855) is on its way. But there is also an issue with the default `viewport` meta tag that NextJS adds. When accessing a `/does-not-exist` that viewport tag is missing, while for a `notFound()` page, it will be there. ### Expected Behavior The default viewport tag is always added to the page ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1207](https://linear.app/vercel/issue/NEXT-1207/default-viewport-tag-not-generated-for-not-found-pages)</sub>
https://github.com/vercel/next.js/issues/49979
https://github.com/vercel/next.js/pull/50044
448b74291e40f888bfc82ebd9d306c08d67e98f2
f0d0811a423d9674f9f89a06cfbb74e839f4a9b6
"2023-05-18T07:55:26Z"
javascript
"2023-05-19T17:50:03Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,949
["Cargo.lock", "Cargo.toml"]
Difference in DOM event behavior in production builds (affects react-virtuoso)
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: 1.22.19 pnpm: 8.3.1 Relevant packages: next: 13.4.2 eslint-config-next: 13.4.2 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://github.com/virtuoso-dev/rv-902-nextapp ### To Reproduce Run the app with `yarn dev` with the console open, scroll the list to the top. `"start reached"` should be displayed. Run the app in production mode - `yarn build && yarn start`. Scrolling to the top does not output "start reached", sometimes it takes a few scrolls for the message to be displayed. Behavior is erratic. ### Describe the Bug Somehow, production mode affects the behavior of the Virtuoso component and the internal event handling is messed up. I do some throttling, scroll event handling, and resize observer observing :). I am the React Virtuoso library author, and I don't expect from you to solve the problem for me, but I would appreciate any pointers on what can cause this. ### Expected Behavior behavior should be identical in dev/production. I tested the same with create react app and vite, and there was no difference between production and dev. ### Which browser are you using? (if relevant) Chrome 113.0.5672.92 ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/49949
https://github.com/vercel/next.js/pull/50137
5526ea504c01135dbcdee2c0c2a26de43252c108
a5af56eda16c41c91bfcdac28d311eaad79af501
"2023-05-17T17:22:01Z"
javascript
"2023-05-22T09:05:17Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,934
["packages/next/src/client/components/router-reducer/reducers/server-action-reducer.ts", "packages/next/src/server/lib/router-utils/filesystem.ts", "test/e2e/app-dir/actions/app-action.test.ts", "test/e2e/app-dir/actions/app/interception-routes/(with-modal)/@modal/(.)test/page.js", "test/e2e/app-dir/actions/app/interception-routes/(with-modal)/@modal/default.js", "test/e2e/app-dir/actions/app/interception-routes/(with-modal)/layout.js", "test/e2e/app-dir/actions/app/interception-routes/(with-modal)/page.js", "test/e2e/app-dir/actions/app/interception-routes/test/page.js"]
Server Error 500: Server Actions + Interception Routes combo
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.1.0 Binaries: Node: 18.16.0 npm: 9.5.0 Yarn: 1.22.19 Relevant packages: next: 13.4.3-canary.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Routing (next/router, next/navigation, next/link) ### Link to the code that reproduces this issue https://github.com/sFritsch09/next-serveractions-with-modal ### To Reproduce Clone repository click on Test Modal **button** to see modal is working. Then refresh page or go to /contact route. There you see a simple form which is using server action to just console log the formData to the server. With Modal activated the server responds with status 500. **To deactivate the modal just rename app/@modal to app/.@modal** ### Describe the Bug When there is **no modal** activated for the same route where the server action is started, the **formData is logged** to the server console just fine. ### Expected Behavior I like to use server actions and interception routes to have a modal with a contact form using server actions ### Which browser are you using? (if relevant) Chrome, Opera GX ### How are you deploying your application? (if relevant) next start
https://github.com/vercel/next.js/issues/49934
https://github.com/vercel/next.js/pull/59175
840b60bc8bb1e760a85c5e19388072dcd0751b78
363c2e8eb7e0bfdb2c89d1129e3d440f8848ad8b
"2023-05-17T13:27:41Z"
javascript
"2023-12-01T22:45:00Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,859
["packages/next/src/server/lib/start-server.ts", "test/development/basic/project-directory-rename.test.ts", "test/e2e/app-dir/metadata-missing-metadata-base/index.test.ts", "test/lib/next-modes/base.ts"]
File-based Metadata - opengraph-image wrong URL
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 18.12.1 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.3-canary.1 eslint-config-next: 13.4.1 react: 18.2.0 react-dom: 18.2.0 typescript: 4.8.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js) ### Link to the code that reproduces this issue https://github.com/ciruz/next-og ### To Reproduce On our latest next.js project we have an `opengraph-image` via File-based metadata, so basically we created an `opengraph-image.jpg` in the `/app` directory. Everything works fine in development mode, as soon as we deploy the project on our production system, the `og:image` has a wrong url (`https://localhost:3000`): ![image](https://github.com/vercel/next.js/assets/987947/9789870a-09ca-4105-9352-b0fa1b6fcbc1) `<meta property="og:image" content="http://localhost:3000/opengraph-image.jpg?dd6067b0d6892c99"/>` All other regular assets, have a realtive path. If I deploy a blank project [`https://github.com/ciruz/next-og`](https://github.com/ciruz/next-og) with an `og:image` to **Vercel**, the URL + Path for the `og:image` is somehow set and not `localhost`, so I assume Vercel sets like a base domain / path somewhere in the background / config of next.js, but it's a different subdomain (more in the end of text). If I set an [assetPrefix](https://nextjs.org/docs/app/api-reference/next-config-js/assetPrefix) in the `next.config.js` the prefix is applied everywhere, but not for the `og:image` or Favicon set via `Metadata`. ```js //next.config.js const isProd = process.env.NODE_ENV === 'production'; module.exports = { // Use the CDN in production and localhost for development. assetPrefix: isProd ? 'https://cdn.mydomain.com' : 'http://foobar.com', }; ``` Result: ``` <meta property="og:image" content="http://localhost:3000/opengraph-image.jpg?3672c8818f51ad56"/> <link rel="icon" href="images/test.svg"/> <script src="http://foobar.com/_next/static/chunks/polyfills.js" noModule=""></script> ``` ![image](https://github.com/vercel/next.js/assets/987947/9d5add69-00d4-4460-a3ad-c9d60cf7582d) When I check the source of my example repo on Vercel, it's also weird that the `og:image` has a different domain/subdomain there: - URL: https://next-og-lyart.vercel.app/ - `og:image` url: `<meta property="og:image" content="https://next-bof7pedda-ciruz.vercel.app/opengraph-image.jpg?3672c8818f51ad56"/>` ![image](https://github.com/vercel/next.js/assets/987947/b769db2b-0407-4bad-9548-4907679bb885) Even if I start my local next.js instance, with just a different port (`:3001`) and view the source, the `og:image` has the default (now wrong) port: ![image](https://github.com/vercel/next.js/assets/987947/ec84c615-ebf8-4b4b-8617-a8d49a839fb5) ### Describe the Bug Metadata `og:image` has the wrong URL. ### Expected Behavior - Have a relative path **OR** - Use the assetPrefix for Metadata too **OR** - Have another way to set a Base Domain for Metadata Informations ### Which browser are you using? (if relevant) Latest Chrome ### How are you deploying your application? (if relevant) Vercel, Other
https://github.com/vercel/next.js/issues/49859
https://github.com/vercel/next.js/pull/49924
4970811c5df19d5c3bad17c0cd573ddd9e6cf178
7641278f82488d2cb8476a7b386a833946da4b09
"2023-05-16T13:38:00Z"
javascript
"2023-05-17T13:37:47Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,844
["packages/next/src/client/components/router-reducer/reducers/navigate-reducer.ts", "test/e2e/app-dir/app-prefetch-false/app-prefetch-false.test.ts", "test/e2e/app-dir/app-prefetch-false/app/[slugA]/[slugB]/page.tsx", "test/e2e/app-dir/app-prefetch-false/app/[slugA]/layout.tsx", "test/e2e/app-dir/app-prefetch-false/app/[slugA]/page.tsx", "test/e2e/app-dir/app-prefetch-false/app/layout.tsx", "test/e2e/app-dir/app-prefetch-false/app/page.tsx", "test/e2e/app-dir/app-prefetch-false/next.config.js"]
[NEXT-1287] Docs: Problem of calling a page twice when navigating a page using nextLink
### What is the improvement or update you wish to see? Problem of calling a page twice when navigating a page using nextLink ### Is there any context that might help us understand? If you apply the prefetch={false} option to nextLink, the page is called twice when navigating the page of a sub-dynamic segment of the dynamic segment path. I am sending additional unnecessary API requests because I make API requests inside the page. For example, when you have a \[categorySlug\]\[subCategorySlug\] path, if you browse the categorySlug page, you request the page only once, but when you browse the subCategorySlug path, you request the page twice If this is a bug, please fix it If it's not a bug, please let me know how to prevent page duplicate calls Thank you. ![](https://uploads.linear.app/099ed59a-06c6-472f-9977-4798721bda90/de3f51bd-f6de-4068-9142-f88c38901aed/67ede91e-8dd8-4c5c-92ab-de5c0fa147c9) ### Does the docs page already exist? Please link to it. \*\*[https://app-directory-v2.vercel.app/context](https://app-directory-v2.vercel.app/context) [https://github.com/holicreact/app-directory-v2.git\*\*](https://github.com/holicreact/app-directory-v2.git\*\*) <sub>From [SyncLinear.com](https://synclinear.com) | [NEXT-1287](https://linear.app/vercel/issue/NEXT-1287/docs-problem-of-calling-a-page-twice-when-navigating-a-page-using)</sub>
https://github.com/vercel/next.js/issues/49844
https://github.com/vercel/next.js/pull/51292
cbeecba83bdc7c749806cb1ac08776ddf7f1174a
c6c4a3d3ebed2e7e43d5bfc377507019dba8a74d
"2023-05-16T06:58:08Z"
javascript
"2023-06-14T13:42:14Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,825
["packages/next/src/build/webpack/plugins/next-types-plugin.ts", "test/integration/app-types/src/app/type-checks/link/page.tsx"]
[NEXT-1203] Can't use external link with `next/link` and `typedRoutes: true`
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 16.20.0 npm: 8.19.4 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.4.3-canary.0 eslint-config-next: 13.4.2 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) Routing (next/router, next/navigation, next/link) ### Link to the code that reproduces this issue https://github.com/jahirfiquitiva/next-link-typed-error/ ### To Reproduce - Create a new Next.js project - Set `experimental.typedRoutes` in `next.config.js` - Link with an external URL will error ### Describe the Bug When setting `experimental.typedRoutes` to `true` in `next.config.js`, and using external URLs with `next/link`, a type error is shown, which can only be fixed by using `as Route`. ``` Type '"https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"' is not assignable to type 'UrlObject | RouteImpl<"https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app">' ``` ``` Type error: "https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" is not an existing route. If it is intentional, please type it explicitly with `as Route`. ``` Error logs: https://vercel.com/jahirfiquitiva/next-link-typed-error/9VkAtcfToKfdMMzxKq2ZM8x5f7yY Possibly related: #47689 ### Expected Behavior No error should be shown when using an external link, and it should be considered acceptable. Should work normally as it does without `typedRoutes` ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) Vercel <sub>[NEXT-1203](https://linear.app/vercel/issue/NEXT-1203/cant-use-external-link-with-nextlink-and-typedroutes-true)</sub>
https://github.com/vercel/next.js/issues/49825
https://github.com/vercel/next.js/pull/50066
33b8e6157f64fe640a4f668db2a6c94a108f2410
1a40651267deb336d149adcee1e057b616fb59f7
"2023-05-15T18:08:31Z"
javascript
"2023-05-23T17:36:09Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,823
["packages/next/src/client/components/router-reducer/fetch-server-response.ts", "packages/next/src/server/app-render/app-render.tsx", "test/e2e/app-dir/error-boundary-and-not-found-linking/app/page.tsx", "test/e2e/app-dir/error-boundary-and-not-found-linking/error-boundary-and-not-found-linking.test.ts", "test/e2e/app-dir/navigation/app/not-found/not-found.js", "test/e2e/app-dir/navigation/app/not-found/result/page.js", "test/e2e/app-dir/navigation/app/not-found/with-link/page.js", "test/integration/api-support/test/index.test.js"]
[NEXT-1218] Navigating within the not-found.tsx page to the same subroute does not work
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 Binaries: Node: 20.1.0 npm: 9.6.4 Yarn: 1.22.19 pnpm: 8.4.0 Relevant packages: next: 13.4.3-canary.0 eslint-config-next: 13.4.1 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Routing (next/router, next/navigation, next/link) ### Link to the code that reproduces this issue https://github.com/valentingavran/not-found-file-navigation-bug ### To Reproduce **Bug 1: Navigating to the same route but with different path paramaters does not work from the Not Found page** 1. Go to the Homepage 2. Refresh the page (for a clean start) 3. Click the second link `Go to a non-existent article (works)` -> Shows the not found page (expected) 4. Click the `View the first article (does not work)` link inside the not found page -> Site stays the same (unexpected) **Bug 2: Navigating to a non-existent page (file for route was not created) does not work** 1. Go to Homepage 2. Refresh the page (for a clean start) 3. Click the third link "Go to an non-existent page (does not work)" -> Site stays the same (unexpected) ### Describe the Bug The URL path changes, but the displayed HTML remains the same ### Expected Behavior Navigating in the two examples above should display the correct pages without having to reload the entire page. ### Which browser are you using? (if relevant) Google Chrome Version 113 ### How are you deploying your application? (if relevant) npm run dev <sub>[NEXT-1218](https://linear.app/vercel/issue/NEXT-1218/navigating-within-the-not-foundtsx-page-to-the-same-subroute-does-not)</sub>
https://github.com/vercel/next.js/issues/49823
https://github.com/vercel/next.js/pull/50047
309bfdb3fdfdb7bb669c1c9e337c0827f3886d31
21e677e95b78e0ddbd022310969f01cd13106812
"2023-05-15T17:13:38Z"
javascript
"2023-05-22T15:04:36Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,807
["packages/next/src/server/lib/start-server.ts", "test/development/basic/project-directory-rename.test.ts", "test/e2e/app-dir/metadata-missing-metadata-base/index.test.ts", "test/lib/next-modes/base.ts"]
`metadataBase` is ignored when `openGraph.images` has a relative path
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023 Binaries: Node: 16.17.0 npm: 8.15.0 Yarn: 1.22.19 pnpm: 7.1.0 Relevant packages: next: 13.4.3-canary.0 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 4.9.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js) ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/magical-cherry-kprjs4 ### To Reproduce 1. Run dev server `yarn next --port 3333` 2. Inspect the og:image meta tag ### Describe the Bug ```ts // app/layout.tsx export const metadata = { metadataBase: new URL("http://localhost:3333"), openGraph: { images: "/og", }, }; ``` And the `og:image` URL will be `http://localhost:3000/og` ### Expected Behavior The `og:image` URL should respect the `metadataBase`. Or read the port from `--port` correctly. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/49807
https://github.com/vercel/next.js/pull/49924
4970811c5df19d5c3bad17c0cd573ddd9e6cf178
7641278f82488d2cb8476a7b386a833946da4b09
"2023-05-15T12:29:25Z"
javascript
"2023-05-17T13:37:47Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,783
["packages/next/src/lib/server-external-packages.json", "pnpm-lock.yaml"]
libraries using `__dirname` don't resolve correctly in server components
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 16.17.1 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.3-canary.0 eslint-config-next: 13.3.1 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.2 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/gifted-einstein-mo56ss?file=%2Fnext.config.js%3A19%2C7 ### To Reproduce - View the code sandbox - See that both the app dir and pages dir are being used, and are calling the same function - Browse to `/`. See that the page loads - Browse to `/foo`. See that the page errors, due to incorrectly deriving the path to the WASM file ### Describe the Bug The reproduction uses a library, [@emurgo/cardano-sererialization-lib](https://github.com/Emurgo/cardano-serialization-lib) that's compiled with [wasm-pack](https://github.com/rustwasm/wasm-pack). Wasm-pack saves the .WASM file, and loads it by deriving the path using this compiled code: ```javascript const path = require('path').join(__dirname, 'cardano_serialization_lib_bg.wasm'); ``` As a hack to see if i could fix it, I edited the compiled lib to use this, which works correctly: ```javascript const path = require('path').join(process.cwd(), "node_modules", "@emurgo", "cardano-serialization-lib-nodejs", 'cardano_serialization_lib_bg.wasm'); ``` ### Expected Behavior I expect it to "just work" in both the `app` and `pages` directory This issue could be fixed by the underlying libraries like wasm-pack, and I [originally opened an issue there](https://github.com/rustwasm/wasm-pack/issues/1282#issuecomment-1546865011), but it seems like this may be a larger problem with nextjs itself ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/49783
https://github.com/vercel/next.js/pull/49938
eba9e39ea487f281dc6cfc1ee2de09e2c4b23d61
2fa58c3a885ef037f6cb5264464beb1c9ef1a72b
"2023-05-14T17:05:33Z"
javascript
"2023-05-23T15:41:59Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,777
["packages/next/src/build/utils.ts"]
Deploying to AWS App Runner results in EADDRNOTAVAIL in multiple AWS regions
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.2.0: Fri Nov 11 02:04:44 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8103 Binaries: Node: 16.18.1 npm: 8.19.2 Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.2 eslint-config-next: 13.0.7 react: 18.2.0 react-dom: 18.2.0 typescript: 4.9.4 warn - Latest canary version not detected, detected: "13.4.2", newest: "13.4.3-canary.0". Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue. Read more - https://nextjs.org/docs/messages/opening-an-issue ``` ### Which example does this report relate to? with-docker ### What browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) CI via Github actions ### Describe the Bug AWS App Runner consistently fails to create the service and fails with the following error. ``` Invariant: failed to start render worker Error: listen EADDRNOTAVAIL: address not available 10.0.248.213 ``` I have tried deploying to more than one region to rule out an issue with the region itself. I get the same error in both `us-east-1` and `ap-southeast-2`. ### Expected Behavior I have confirmed the image runs as expected locally. It does not work when deployed via AWS App Runner. ### To Reproduce Deploy image to AWS ECR. Create a new AWS App Runner service using the image from ECR as the target image.
https://github.com/vercel/next.js/issues/49777
https://github.com/vercel/next.js/pull/54445
724ece8508456eed74414b47a0073e56706d42a7
42ad2cef2297159aea13f948200daae2a91ab696
"2023-05-14T10:20:20Z"
javascript
"2023-09-14T15:30:56Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,774
["packages/next/src/client/components/navigation.test.ts", "packages/next/src/client/components/navigation.ts"]
ReadonlyURLSearchParams is incompatible with URLSearchParams
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 Binaries: Node: 19.8.1 npm: 9.5.1 Yarn: 1.22.19 pnpm: 8.5.0 Relevant packages: next: 13.4.2 eslint-config-next: 13.4.2 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 warn - Latest canary version not detected, detected: "13.4.2", newest: "13.4.3-canary.0". Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue. Read more - https://nextjs.org/docs/messages/opening-an-issue ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) Routing (next/router, next/navigation, next/link) ### Link to the code that reproduces this issue no ### To Reproduce ```ts import { usePathname, useRouter, useSearchParams } from "next/navigation"; const router = useRouter(); const pathname = usePathname(); const searchParams = useSearchParams(); const clonedSearchParams = new URLSearchParams(searchParams); clonedSearchParams.sort(); router.replace(["/login", clonedSearchParams.toString()].filter(Boolean).join("?")); ``` ### Describe the Bug Got type error > Argument of type 'ReadonlyURLSearchParams' is not assignable to parameter of type 'string | URLSearchParams | string[][] | Record<string, string> | undefined'. Property 'size' is missing in type 'ReadonlyURLSearchParams' but required in type 'URLSearchParams'.ts(2345) url.d.ts(840, 18): 'size' is declared here. ### Expected Behavior No type error ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/49774
https://github.com/vercel/next.js/pull/53144
11dfdf8d7a01a4657e57d090ad82b612361ee3ab
847c14ea15d42b3fa8a1701d0a549b8a33d9caef
"2023-05-14T09:14:55Z"
javascript
"2023-08-17T18:15:45Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,753
["packages/next/src/build/index.ts"]
React is null in vercel production build
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 18.12.0 npm: 8.19.3 Yarn: 1.22.17 pnpm: 7.29.1 Relevant packages: next: 13.4.3-canary.0 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://github.com/jeetiss/next-react-is-null ### To Reproduce - deploy to vercel - build will fail with error ``` 17:08:21.113 | TypeError: Cannot read properties of null (reading 'useEffect') 17:08:21.113 | at exports.useEffect (/vercel/path0/node_modules/react/cjs/react.production.min.js:24:292) 17:08:21.113 | at QueryClientProvider (file:///vercel/path0/node_modules/@tanstack/react-query/build/lib/QueryClientProvider.mjs:46:9) 17:08:21.113 | at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:114:273) 17:08:21.114 | at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) 17:08:21.114 | at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:119:95) 17:08:21.114 | at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) 17:08:21.114 | at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:115:9) 17:08:21.115 | at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) 17:08:21.115 | at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:115:9) 17:08:21.115 | at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) 17:08:21.117 | Β  17:08:21.118 | Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error 17:08:21.118 | TypeError: Cannot read properties of null (reading 'useEffect') 17:08:21.118 | at exports.useEffect (/vercel/path0/node_modules/react/cjs/react.production.min.js:24:292) 17:08:21.118 | at QueryClientProvider (file:///vercel/path0/node_modules/@tanstack/react-query/build/lib/QueryClientProvider.mjs:46:9) 17:08:21.118 | at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:114:273) 17:08:21.120 | at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) 17:08:21.124 | at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:119:95) 17:08:21.124 | at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) 17:08:21.124 | at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:115:9) 17:08:21.125 | at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) 17:08:21.125 | at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:115:9) 17:08:21.125 | at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) ``` ### Describe the Bug deploy to vercel doesn't work when both `app` and `pages` directories are exist ### Expected Behavior deploy should work ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) Vercel
https://github.com/vercel/next.js/issues/49753
https://github.com/vercel/next.js/pull/49954
c2da56e1941e8dc09bf3c1352474ecd0ce973d04
ea9b1f5ebcbdc0dbcce5aad38a51fec4908a4680
"2023-05-13T14:15:03Z"
javascript
"2023-05-18T23:51:18Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,662
["packages/next/src/build/entries.ts", "packages/next/src/build/normalize-catchall-routes.ts", "packages/next/src/server/future/route-matcher-providers/dev/dev-app-page-route-matcher-provider.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-catchall/@slot/baz/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-catchall/bar/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-catchall/layout.tsx", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"]
[NEXT-1160] Clicking Links in intercepted routes does not unmount the interceptor route
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #41~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 31 16:00:14 UTC 2 Binaries: Node: 18.12.1 npm: 8.19.2 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.4.2-canary.5 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: N/A ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Routing (next/router, next/navigation, next/link) ### Link to the code that reproduces this issue https://codesandbox.io/p/github/mkarajohn/nextgram/draft/restless-leftpad?file=/components/frame/index.js ### To Reproduce 1. Open the codesandbox in a new separate tab in order to be able to see the actual browser URL 2. Click on a photo in order to intercept the route and open the modal with the photo details. 3. Instead of clicking on the overlay click the "go back" link instead, located just below the photo ### Describe the Bug When you click the `Link` and the URL changes to `/` the interceptor route remains mounted and does not go away. ### Expected Behavior I would expect that since the route was changed (via `Link` no less) the interceptor page should disappear once the route that it was intercepting was changed. [Screencast from 11-05-2023 04:23:04 ΜΜ.webm](https://github.com/vercel/next.js/assets/3789226/1e82fc92-9801-4b57-a7d8-d34c56078391) ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1160](https://linear.app/vercel/issue/NEXT-1160/clicking-links-in-intercepted-routes-does-not-unmount-the-interceptor)</sub>
https://github.com/vercel/next.js/issues/49662
https://github.com/vercel/next.js/pull/58215
b740fe8fa4cec0e3733aa21d16e985b04fb25111
4024b25e8cc0d76d832efb14858d65718a24211e
"2023-05-11T13:24:30Z"
javascript
"2023-11-09T10:11:06Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,656
["packages/next/src/server/config.ts", "test/integration/i18n-support/test/index.test.js"]
i18n domain routing combined with `middleware.ts` produces an infinite loop
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 21.6.0: Sat Jun 18 17:05:47 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T8101 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: 1.22.19 pnpm: 7.9.0 Relevant packages: next: 13.4.2-canary.5 eslint-config-next: 13.4.1 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) Internationalization (i18n), Middleware / Edge (API routes, runtime), Routing (next/router, next/navigation, next/link) ### Link to the code that reproduces this issue https://github.com/p6l-richard/i18n-repro ### To Reproduce 1. **Enable local subdomain**. Update `/etc/hosts` file with `echo "127.0.0.1 de.localhost" | sudo tee -a /etc/hosts` (macOS & Linux) 2. **Install dependencies**. `pnpm i` 3. **Run the project**. `pnpm dev` 4. **Open `http://localhost:3001`**. This will cause the reloading loop [like this one](https://share.cleanshot.com/czjB0nLr). ### Describe the Bug With the following present: - Middleware (`middleware.ts`), and - i18n Domains Routing (`i18n: { domains: {...} }`) the client re-navigates to the same URL in an _infinite loop_. [Here is a demo](https://media.cleanshot.cloud/media/50227/uUBJwFO1VRSRl2sN4e0kiqt2xHzHT0KOeNtvViEK.gif?Expires=1683824618&Signature=s7GanpZEeSPioZ~jzYJY9tMvl5gsfmpIsJ7T42V-MGA0-O-bw5jH5BZcQ3EVbbkNfG6CbwaE4r0IY9KDAP-Gcl4geVE2LJZdR0ARb597KQWU06mIs47gRpZIMALEqzXiWuiF3vGqVuqpMiNpVBrg-zKTnLDc4P0mU4-0Olx8zBzdThuwhKnqkANgpm3stDTwEbCgU62KwoG78QmZsdVEi-ra2ksqmZu1uslRHPESP3l09vvhoPbQAQNLOMEIuGx7XBkMOhw0rN4SgZIlmjcAr~mR4NA-YEnTXcxOFdf4RB~hc0GRe0IqqtgKr4S5XrXEXIH5jHljANynWYPiZacQbA__&Key-Pair-Id=K269JMAT9ZF4GZ) of this issue. I debugged this and also identified the root for the issue. The [following condition](https://github.com/vercel/next.js/blob/000d022b4e83b7e9022af085911abd9bbf85f7e2/packages/next/src/client/index.tsx#L113-L157) evaluates to true in the `@next/client` package: - `initialMatchesMiddleware` - `initialData.props && initialData.props.__N_SSG` <img width="1035" alt="CleanShot 2023-05-11 at 13 07 52@2x" src="https://github.com/vercel/next.js/assets/18185649/aef0c25a-782d-44a6-9aea-3dd0446ff921"> This then leads to the `router.replace` call which ends up being the same URL and therefore causing the **infinite URL replacement**: ```tsx // update query on mount for exported pages router .replace( router.pathname + '?' + String( assign( urlQueryToSearchParams(router.query), new URLSearchParams(location.search) ) ), asPath, { // @ts-ignore // WARNING: `_h` is an internal option for handing Next.js // client-side hydration. Your app should _never_ use this property. // It may change at any time without notice. _h: 1, // Fallback pages must trigger the data fetch, so the transition is // not shallow. // Other pages (strictly updating query) happens shallowly, as data // requirements would already be present. shallow: !initialData.isFallback && !initialMatchesMiddleware, } ) ``` `initialMatchesMiddleware` evaluates to true here, so the shallow navigation is not enabled. I also saw that, further down, this is because of a regular expression for the middleware that always returns true: `.*`, which matches any string. This is called in the private [_initialMatchesMiddlewarePromise function](https://github.com/vercel/next.js/blob/02d020c459ca59a94fa2a22c76bf846121f7e360/packages/next/src/shared/lib/router/router.ts#L870-L892). E.g. I added logs for the regular expression called [here](https://github.com/vercel/next.js/blob/02d020c459ca59a94fa2a22c76bf846121f7e360/packages/next/src/shared/lib/router/router.ts#L116-L118): ``` export async function matchesMiddleware<T extends FetchDataOutput>( options: MiddlewareEffectParams<T> ): Promise<boolean> { //... // Check only path match on client. Matching "has" should be done on server // where we can access more info such as headers, HttpOnly cookie, etc. return matchers.some((m) => new RegExp(m.regexp).test(asWithBasePathAndLocale) // this logs: {"regex": ".*", "asWithBasePathAndLocale": "/en"} ) ``` ### Expected Behavior Avoid the router.replace() call when middleware & `domains` routing is used. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/49656
https://github.com/vercel/next.js/pull/50220
616ae108d9193316c65003536c48a0d6ff56d8aa
916d2aa4d5fc0f3663086fe43d205cece362dacf
"2023-05-11T11:17:46Z"
javascript
"2023-06-14T18:07:58Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,614
["packages/next/src/server/app-render/get-segment-param.tsx", "packages/next/src/shared/lib/router/utils/route-regex.test.ts", "packages/next/src/shared/lib/router/utils/route-regex.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-routes-dynamic/photos/(.)[author]/[id]/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-routes-dynamic/photos/[author]/[id]/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-routes-dynamic/photos/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"]
[NEXT-1166] Modal Interception does not work for (.)[dynamic] routes
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 18.14.0 npm: 9.3.1 Yarn: 1.22.19 pnpm: 7.27.0 Relevant packages: next: 13.4.2-canary.4 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/youthful-butterfly-l44fsy ### To Reproduce 1. Go to sandbox and run the dev server. 2. Click on the "Photos" link 3. Click on "Go to /photos/[author]/[id]", where the author and id is "john/123" 4. The interception does not work, the [author] params is "(.)john" 5. Reload the page, the [author] params is "john" Now go back to the root and click on the "Static" link. This route doesn't use dynamic routes and the interception works as expected. ### Describe the Bug When using dynamic routes in the modal, the interception of the current route does not work. That is, when I'm on the "/photos" page, I want a modal-ize "/photos/[author]/[id]" ### Expected Behavior When on the "/photos" page, clicking on a child route should intercept the child modal. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1166](https://linear.app/vercel/issue/NEXT-1166/modal-interception-does-not-work-for-[dynamic]-routes)</sub>
https://github.com/vercel/next.js/issues/49614
https://github.com/vercel/next.js/pull/51526
c6313606c9c80e5b2534e18e92942ecb0ade34b4
6f61fb40682ef3a5b7882ddbcb3cb93f3dc58b88
"2023-05-10T15:23:08Z"
javascript
"2023-06-22T09:43:24Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,612
["packages/next/src/client/components/layout-router.tsx", "test/e2e/app-dir/navigation/app/hash-with-scroll-offset/global.css", "test/e2e/app-dir/navigation/app/hash-with-scroll-offset/page.js", "test/e2e/app-dir/navigation/navigation.test.ts"]
[NEXT-1171] Link to anchor doesn't respect scroll-padding properties in App Router
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: 1.22.19 pnpm: 8.4.0 Relevant packages: next: 13.4.2-canary.4 eslint-config-next: 13.4.1 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) Routing (next/router, next/navigation, next/link) ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/crimson-breeze-8r3ccl ### To Reproduce 1. Open the [minimal reproduction app](https://codesandbox.io/p/sandbox/crimson-breeze-8r3ccl) 2. Press the link to **Section A** or **Section B** 3. Notice that the header is touching the top of the viewport, despite `scroll-padding-top` being set in `globals.css` 4. Refresh the page, and notice how the scroll position correctly updates to account for the `scroll-padding-top` when the navigation is done outside of Next.js ### Describe the Bug When linking to an anchor on a page using the `Link` component, any `scroll-padding` CSS property values aren't respected. If I have a global scroll-padding value of `2rem` set, when navigating via a native browser link to eg. `/about#contact`, the page will navigate to the element with an ID of `contact` with `2rem` of space above it. However, when using Next.js's `Link` component, the element touches the top of the viewport. ### Expected Behavior I'd expect `Link` to behave like a native `a` tag and respect any `scroll-padding` values set in CSS. ### Which browser are you using? (if relevant) Firefox 112.0.2 ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1171](https://linear.app/vercel/issue/NEXT-1171/link-to-anchor-doesnt-respect-scroll-padding-properties-in-app-router)</sub>
https://github.com/vercel/next.js/issues/49612
https://github.com/vercel/next.js/pull/51268
4ef3982f62655a9215361bf3c79a6f6a33f10d50
3427d324d8cb3fc51d6f1a346085b918d929127c
"2023-05-10T14:25:02Z"
javascript
"2023-06-14T03:50:51Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,593
["packages/next/src/build/index.ts"]
[NEXT-1172] Performance of the build has detoriated after 13.3.0
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 18.15.0 npm: 9.5.0 Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.2-canary.4 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 4.9.5 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://github.com/jonime/next-build-multithreading-issue ### To Reproduce - `npm run build` ### Describe the Bug Build performance has deteriorated after updating to 13.3.0 or later. The build process doesn't seem to use cores properly because CPU usage is less than 100%. ``` [email protected] npm run build 26.38s user 9.03s system 270% cpu 13.068 total [email protected] npm run build 27.16s user 8.40s system 94% cpu 37.733 total [email protected] npm run build 26.03s user 8.69s system 89% cpu 38.780 total [email protected] npm run build 23.02s user 7.39s system 88% cpu 34.267 total [email protected] npm run build 28.97s user 8.36s system 89% cpu 41.489 total ``` ### Expected Behavior Build should be faster ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1172](https://linear.app/vercel/issue/NEXT-1172/performance-of-the-build-has-detoriated-after-1330)</sub>
https://github.com/vercel/next.js/issues/49593
https://github.com/vercel/next.js/pull/50194
3d40cb01ab8689aa5944d9c62445de4ef503175e
0718dbb7a549853c1a9eef78b008490d16020a43
"2023-05-10T11:15:24Z"
javascript
"2023-05-23T15:32:05Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,536
["packages/next/src/build/utils.ts"]
TypeError: handler is not a function before server is fully online
### Verify canary release - [x] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #1 SMP Tue Sep 13 07:51:46 UTC 2022 Binaries: Node: 20.1.0 npm: 9.6.4 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.4.1 eslint-config-next: 13.4.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) ### To Reproduce I'm building the app for docker in standalone mode, so I start the server with `node server.js`. I'm also deploying in kubernetes, and this is happening. at the moment it's unclear if it's happening because traffic is hitting the pod before the server is fully ready or there's something else. ``` /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, output: 'standalone' }; module.exports = nextConfig; ``` ### Describe the Bug ``` β”‚ TypeError: handler is not a function β”‚ β”‚ at Server.<anonymous> (/app/server.js:29:11) β”‚ β”‚ at Server.emit (node:events:511:28) β”‚ β”‚ at parserOnIncoming (node:_http_server:1109:12) β”‚ β”‚ at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) β”‚ β”‚ TypeError: handler is not a function β”‚ β”‚ at Server.<anonymous> (/app/server.js:29:11) β”‚ β”‚ at Server.emit (node:events:511:28) β”‚ β”‚ at parserOnIncoming (node:_http_server:1109:12) β”‚ β”‚ at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) β”‚ β”‚ TypeError: handler is not a function β”‚ β”‚ at Server.<anonymous> (/app/server.js:29:11) β”‚ β”‚ at Server.emit (node:events:511:28) β”‚ β”‚ at parserOnIncoming (node:_http_server:1109:12) β”‚ β”‚ at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) β”‚ β”‚ Listening on port 3000 url: http://airbroke-web-f88f4dbc7-dvxqb:3000 ``` ### Expected Behavior I'm debugging an issue with prisma connections and stumbled upon this, so I took a look at the compiled server.js maybe to ensure the server is fully initialized before it starts accepting incoming traffic, we can move the `handler` initialization to be before the `createServer` call, like this? ```js (async () => { handler = await createServerHandler({ port: currentPort, hostname, dir, conf: nextConfig, }) const server = http.createServer(async (req, res) => { try { await handler(req, res) } catch (err) { console.error(err); res.statusCode = 500 res.end('Internal Server Error') } }) if ( !Number.isNaN(keepAliveTimeout) && Number.isFinite(keepAliveTimeout) && keepAliveTimeout >= 0 ) { server.keepAliveTimeout = keepAliveTimeout } server.listen(currentPort, (err) => { if (err) { console.error("Failed to start server", err) process.exit(1) } console.log( 'Listening on port', currentPort, 'url: http://' + hostname + ':' + currentPort ) }) })() ``` ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/49536
https://github.com/vercel/next.js/pull/49548
ec6cdb3987964539dac5403016021a48c97e0eae
0f332055d43fa97acbb52d7a9c187850bc08073f
"2023-05-09T16:22:29Z"
javascript
"2023-05-11T17:36:40Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,489
["packages/next/src/server/typescript/rules/config.ts"]
[NEXT-1214] TS Plugin Error: "false" is not a valid value for the "dynamicParams" option. ts(71003)
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 Binaries: Node: 18.4.0 npm: 8.12.1 Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.2-canary.2 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) TypeScript (plugin, built-in types) ### Link to the code that reproduces this issue https://github.com/junaydb/nextjs-ts-bug-repro ### To Reproduce Export the `dynamicParams` variable from a route. ### Describe the Bug TS error: `"false" is not a valid value for the "dynamicParams" option. ts(71003)` when exporting `dynamicParams` from a route. Only occurred since I updated to `13.4.1` from `13.2`. The application builds with no errors, only appears in the text editor (vscode). ### Expected Behavior No error. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1214](https://linear.app/vercel/issue/NEXT-1214/ts-plugin-error-false-is-not-a-valid-value-for-the-dynamicparams)</sub>
https://github.com/vercel/next.js/issues/49489
https://github.com/vercel/next.js/pull/52211
220377e3817b7111a6dcd093592a5011c8974049
9bd5169dcd7e87707b53bd6d61de5a956bf14b7b
"2023-05-08T23:45:37Z"
javascript
"2023-07-04T17:31:01Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,437
["packages/next/src/client/components/static-generation-async-storage.ts", "packages/next/src/server/lib/patch-fetch.ts", "test/e2e/app-dir/app-static/app-static.test.ts", "test/e2e/app-dir/app-static/app/default-cache/page.js", "test/e2e/app-dir/app-static/app/fetch-no-cache/page.js", "test/e2e/app-dir/app-static/app/force-cache/page.js"]
Incorrect default if fetch option is omitted
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023 Binaries: Node: 18.15.0 npm: N/A Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.4.1 eslint-config-next: 13.3.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/relaxed-blackburn-v0z5vb ### To Reproduce - Reload repeatedly. - The second fetch (with defult options) is expected to behave as a `force-cache`. - However, it is actually updated on every reload (works as `no-store`). ### Describe the Bug [fetch API Reference](https://nextjs.org/docs/app/api-reference/functions/fetch#optionscache) says: > force-cache (default) - Next.js looks for a matching request in its HTTP cache. And comments on the example code in the above document also say that **`force-cache` can be omitted**: ``` export default async function Page() { // This request should be cached until manually invalidated. // Similar to `getStaticProps`. // `force-cache` is the default and can be omitted. const staticData = await fetch(`https://...`, { cache: 'force-cache' }); // This request should be refetched on every request. // Similar to `getServerSideProps`. const dynamicData = await fetch(`https://...`, { cache: 'no-store' }); // This request should be cached with a lifetime of 10 seconds. // Similar to `getStaticProps` with the `revalidate` option. const revalidatedData = await fetch(`https://...`, { next: { revalidate: 10 }, }); return <div>...</div>; } ``` In the example, omitting the options in the first fetch works as documented. ``` export default async function Page() { // Works as `force-cache`. const staticData = await fetch(`https://...`); const dynamicData = await fetch(`https://...`, { cache: 'no-store' }); const revalidatedData = await fetch(`https://...`, { next: { revalidate: 10 }, }); return <div>...</div>; } ``` However, if omitting the option in the second fetch, the behavior is different. ``` export default async function Page() { const dynamicData = await fetch(`https://...`, { cache: 'no-store' }); // Expects `force-cache` but works as `no-store`. const staticData = await fetch(`https://...`); const revalidatedData = await fetch(`https://...`, { next: { revalidate: 10 }, }); return <div>...</div>; } ``` And also: ``` export default async function Page() { const revalidatedData = await fetch(`https://...`, { next: { revalidate: 10 }, }); // Expects `force-cache` but works as `next: {revalidate: 10}`. const staticData = await fetch(`https://...`); const dynamicData = await fetch(`https://...`, { cache: 'no-store' }); return <div>...</div>; } ``` Furthermore, if omitting the option for the third fetch, it seems to be aligned with the fetch with the shortest lifetime. ``` export default async function Page() { const revalidatedData = await fetch(`https://...`, { next: { revalidate: 10 }, }); const dynamicData = await fetch(`https://...`, { cache: 'no-store' }); // Expects `force-cache` but works as `no-store`. const staticData = await fetch(`https://...`); return <div>...</div>; } ``` ### Expected Behavior Within static components, `force-cache` should always be the default, regardless of the position of the fetch. ### Which browser are you using? (if relevant) Chrome 113.0.5672.63 ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/49437
https://github.com/vercel/next.js/pull/49638
f3222471c67134f2cbd094682bcb3673166de7d5
2eeb1c1bd1d49d163e9d76b8c3a1c56d5de0dc33
"2023-05-08T07:35:21Z"
javascript
"2023-05-11T03:42:25Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,425
["packages/next/src/client/components/app-router.tsx", "packages/next/src/client/components/router-reducer/reducers/server-action-reducer.ts", "packages/next/src/client/components/router-reducer/router-reducer-types.ts", "test/e2e/app-dir/actions/app-action.test.ts", "test/e2e/app-dir/actions/app/client/actions.js", "test/e2e/app-dir/actions/app/client/page.js", "test/e2e/app-dir/actions/app/server/actions.js", "test/e2e/app-dir/actions/app/server/counter.js", "test/e2e/app-dir/actions/app/server/page.js"]
[NEXT-1131] Cannot navigates between pages when server actions are running
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Tue Apr 25 04:07:22 PDT 2023; root:xnu-8796.121.2~8/RELEASE_ARM64_T8103 Binaries: Node: 18.15.0 npm: 9.5.0 Yarn: 1.22.18 pnpm: 7.1.0 Relevant packages: next: 13.4.1 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://github.com/Fredkiss3/bug-next-server-actions-blocking-navigation ### To Reproduce Go to the app, try clicking on the button multiple times in succession, then after that try clicking on the link, you won't be able to navigate until all of the requests to the action have finished. ### Describe the Bug You can see in the video below by yourself, the request has intentionnaly been slowed down to simulate a slow network : https://user-images.githubusercontent.com/38298743/236712918-42c53c80-7c33-40af-85bf-f1eeeaddddf5.mov ### Expected Behavior server actions running should not be blocking the UI. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1131](https://linear.app/vercel/issue/NEXT-1131/cannot-navigates-between-pages-when-server-actions-are-running)</sub>
https://github.com/vercel/next.js/issues/49425
https://github.com/vercel/next.js/pull/54307
36c14da3d58540009b4c08c56d33d5accff34912
892839ff83f25b368f71a1e79195699d7e4536fa
"2023-05-08T01:12:46Z"
javascript
"2023-08-21T20:34:42Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,387
["docs/02-app/02-api-reference/04-functions/fetch.mdx", "docs/02-app/02-api-reference/04-functions/revalidatePath.mdx", "docs/02-app/02-api-reference/04-functions/revalidateTag.mdx", "packages/next/src/lib/constants.ts", "packages/next/src/server/lib/patch-fetch.ts", "packages/next/src/server/web/spec-extension/revalidate-path.ts", "packages/next/src/server/web/spec-extension/unstable-cache.ts"]
[NEXT-1186] revalidatePath not working for dynamic routes while res.revalidate works fine
### Verify canary release * [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ``` Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:51:50 PDT 2023; root:xnu-8796.121.2~5/RELEASE_X86_64 Binaries: Node: 16.17.1 npm: 8.19.2 Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.7-canary.1 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue [https://github.com/roxizhauk/revalidate-path](https://github.com/roxizhauk/revalidate-path) [CodeSandBox](https://codesandbox.io/p/github/roxizhauk/revalidate-path/main?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522panelType%2522%253A%2522TABS%2522%252C%2522id%2522%253A%2522clj2ntadl000b3b6maz3vfr5a%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522panelType%2522%253A%2522TABS%2522%252C%2522id%2522%253A%2522clj2okkxn01fz3b6mc42extf2%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clj2ntadl000b3b6maz3vfr5a%2522%253A%257B%2522id%2522%253A%2522clj2ntadl000b3b6maz3vfr5a%2522%252C%2522activeTabId%2522%253A%2522clj2os9v900tj3b6mte0hpxrj%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clj2os9v900tj3b6mte0hpxrj%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522build%2522%257D%255D%257D%252C%2522clj2okkxn01fz3b6mc42extf2%2522%253A%257B%2522id%2522%253A%2522clj2okkxn01fz3b6mc42extf2%2522%252C%2522activeTabId%2522%253A%2522clj2ovwh201li3b6mii003kwn%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clj2ot82e017a3b6m59llreux%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522start%2522%257D%252C%257B%2522type%2522%253A%2522TASK_PORT%2522%252C%2522taskId%2522%253A%2522start%2522%252C%2522port%2522%253A3000%252C%2522id%2522%253A%2522clj2ovwh201li3b6mii003kwn%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522path%2522%253A%2522%252Fblog%252Ftest%2522%257D%255D%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D) ### To Reproduce Visit `/blog/[anything]` (e.g. `/blog/test` ) to generate a dynamic page and check the time shown To try "unsuccessful" app directory's `revalidatePath`: 1. hit `/api/revalidate-path?path=/blog/[anything]` and you'll see "revalidated" 2. refresh `/blog/[anything]` and you'll see the time not changed To try "successful" pages directory's `res.revalidate`: 1. hit `/api/revalidate?path=/blog/[anything]` and you'll see "revalidated" 2. refresh `/blog/[anything]` and you'll see the time changed ### Describe the Bug The app directory's `revalidatePath` works fine for "/" or "/blog" but dynamic routes like "/blog/1" or "/blog/test" while pages directory's `res.revalidate` works fine for all ### Expected Behavior `revalidatePath` works the same as `res.revalidate` for dynamic routes ### Which browser are you using? (if relevant) *No response* ### How are you deploying your application? (if relevant) *No response* <sub>From [SyncLinear.com](https://synclinear.com) | [NEXT-1186](https://linear.app/vercel/issue/NEXT-1186/revalidatepath-not-working-for-dynamic-routes-while-resrevalidate)</sub>
https://github.com/vercel/next.js/issues/49387
https://github.com/vercel/next.js/pull/55083
45fbd4db1454aecab35ac73ac42379f47e22a1e4
c2f587640ab97f4cd1e18c7b1b1ecd0405ab6c56
"2023-05-07T04:32:50Z"
javascript
"2023-09-12T18:28:16Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,383
["packages/next/src/lib/server-external-packages.json"]
[NEXT-1136] Puppeteer error with Next13 app dir : TypeError: oe is not a function
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #41~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 31 16:00:14 UTC 2 Binaries: Node: 16.15.1 npm: 8.11.0 Yarn: 1.22.15 pnpm: 8.3.1 Relevant packages: next: 13.4.1-canary.2 eslint-config-next: 13.4.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/friendly-violet-44ognx?selection=%5B%7B%22endColumn%22%3A1%2C%22endLineNumber%22%3A20%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A20%7D%5D ### To Reproduce Try to navigate to the path /api/scraper ### Describe the Bug Server Error TypeError: oe is not a function ![image](https://user-images.githubusercontent.com/55456507/236649524-40c0844b-2095-47bb-8753-cbf6935d527c.png) ### Expected Behavior When using the pages directory, it correctly returns the h1 of the page, on the other hand, when migrating it to the api directory, it returns that error. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1136](https://linear.app/vercel/issue/NEXT-1136/puppeteer-error-with-next13-app-dir-typeerror-oe-is-not-a-function)</sub>
https://github.com/vercel/next.js/issues/49383
https://github.com/vercel/next.js/pull/49597
85c2921bf530ab7d191423c226af59f094c82783
3e14cf698b59e33611742ddd1072ad575ee22dcd
"2023-05-06T22:40:28Z"
javascript
"2023-05-11T09:30:59Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,378
["packages/next-swc/crates/core/src/server_actions.rs", "packages/next-swc/crates/core/tests/fixture/server-actions/client/3/input.js", "packages/next-swc/crates/core/tests/fixture/server-actions/client/3/output.js"]
[NEXT-1137] "use server" throws error for destructuring assignment export
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Home Single Language Binaries: Node: 18.14.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.1 eslint-config-next: 13.4.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/musing-shockley-gevrg3?file=%2FREADME.md ### To Reproduce ```ts "use server"; // ... export const { sampleFunction } = someObject; // sampleFunction is async function. ``` ### Describe the Bug `Only async functions are allowed to be exported in a "use server" file` is thrown at compilation. ### Expected Behavior No error should be thrown as only async functions are exported even if through destructuring. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1137](https://linear.app/vercel/issue/NEXT-1137/use-server-throws-error-for-destructuring-assignment-export)</sub>
https://github.com/vercel/next.js/issues/49378
https://github.com/vercel/next.js/pull/49600
2f9ff160aa5fa2d0521685119bb108f075cbad92
2f3a503d8b7e308a48e88d19ba50ade3774cf156
"2023-05-06T19:16:19Z"
javascript
"2023-05-10T17:46:21Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,374
["packages/next/src/build/index.ts", "test/e2e/app-dir/app-static/app-static.test.ts", "test/e2e/app-dir/app-static/app/route-handler/static-cookies/route.js"]
Error: The `initialHeaders` argument for `Prerender` must be an object with string key/values
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #42~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 18 17:40:00 UTC 2 Binaries: Node: 18.15.0 npm: 9.5.0 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.4.1 eslint-config-next: 13.4.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) Middleware / Edge (API routes, runtime) ### Link to the code that reproduces this issue npx create-next-app@latest // with typescript, eslint, tailwind src directory and @/* import, ### To Reproduce ```json // latest version from 2023-may-06 "dependencies": { "@types/node": "20.1.0", "@types/react": "18.2.6", "@types/react-dom": "18.2.4","autoprefixer": "10.4.14", "eslint": "8.40.0", "eslint-config-next": "13.4.1", "next": "13.4.1", "postcss": "8.4.23", "react": "18.2.0", "react-dom": "18.2.0", "tailwindcss": "3.3.2", "typescript": "5.0.4" } ``` ```typescript // project/src/app/example/cookie1/route.ts import { NextResponse } from "next/server"; export async function GET(req: NextRequest) { const res = new NextResponse(); res.cookies.set("theme", "light"); res.cookies.set("my_company", "ACME"); return res; }; ``` ### Describe the Bug if you run ```bash rm -rf .next && npm run build && npm run start ``` Its run ok, but if you deploy it at vercel you get this error. `Error: The initialHeaders argument for Prerender must be an object with string key/values` Maybe source of problem is this code: https://github.com/vercel/vercel/blob/main/packages/build-utils/src/prerender.ts ```javascript // line 96 if (initialHeaders !== undefined) { if ( !initialHeaders || typeof initialHeaders !== 'object' || Object.entries(initialHeaders).some( ([key, value]) => typeof key !== 'string' || typeof value !== 'string' ) ) { throw new Error( `The \`initialHeaders\` argument for \`Prerender\` must be an object with string key/values` ); } this.initialHeaders = initialHeaders; } ``` ### Expected Behavior It deploys with out error. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) Vercel
https://github.com/vercel/next.js/issues/49374
https://github.com/vercel/next.js/pull/49643
e6d50ec6b413a3fcfb100491aeaf33939b3a17a5
bc4515d8b69bb2361ce67bc43d899b93aa6652e6
"2023-05-06T17:27:31Z"
javascript
"2023-05-11T04:44:11Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,373
["errors/dynamic-server-error.mdx", "packages/next/src/client/components/headers.ts", "packages/next/src/client/components/static-generation-bailout.ts", "test/development/acceptance-app/dynamic-error.test.ts", "test/e2e/app-dir/headers-static-bailout/app/layout.tsx", "test/e2e/app-dir/headers-static-bailout/app/page-with-headers/page.tsx", "test/e2e/app-dir/headers-static-bailout/app/page-without-headers/page.tsx", "test/e2e/app-dir/headers-static-bailout/headers-static-bailout.test.ts", "test/e2e/app-dir/headers-static-bailout/next.config.js"]
[NEXT-1181] DynamicServerError: Dynamic server usage: cookies
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 16.13.2 npm: 9.3.0 Yarn: 1.22.19 pnpm: 7.25.1 Relevant packages: next: 13.4.1 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://github.com/focux/next-cookies-bug ### To Reproduce 1. Clone the repository 2. Run `npm run build` ### Describe the Bug After upgrading to Next from `13.3.5` to `13.4.1`, I'm getting a lot of errors that say: ``` - info Creating an optimized production build ..node:internal/process/promises:246 triggerUncaughtException(err, true /* fromPromise */); ^ DynamicServerError: Dynamic server usage: cookies at staticGenerationBailout (/Users/[redacted]/Projects/[redacted]/apps/web-app/.next/server/chunks/3311.js:46379:21) at cookies (/Users/[redacted]/Projects/[redacted]/apps/web-app/.next/server/chunks/6647.js:172:62) at getAccessToken (/Users/[redacted]/Projects/[redacted]/apps/web-app/.next/server/chunks/9041.js:30473:40) at /Users/[redacted]/Projects/[redacted]/apps/web-app/.next/server/chunks/9041.js:30505:55 at /Users/[redacted]/Projects/[redacted]/apps/web-app/.next/server/chunks/6647.js:2598:44 { digest: 'DYNAMIC_SERVER_USAGE' } ``` The app works good when running it on development mode. ### Expected Behavior According to the docs, using the `cookies` function automatically opt-ins my pages to dynamic rendering. So I would expect the build to succeed as before and also those errors to be clearer to at least know in what page is originating. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1181](https://linear.app/vercel/issue/NEXT-1181/dynamicservererror-dynamic-server-usage-cookies)</sub>
https://github.com/vercel/next.js/issues/49373
https://github.com/vercel/next.js/pull/53402
b41497d7631d36e0ce5849a05b96cd93e7e27e70
fef6f82abafdad6c32a61ebbf4bff77f634bfc2d
"2023-05-06T17:06:25Z"
javascript
"2023-08-08T10:49:53Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,355
["packages/next/src/server/lib/render-server-standalone.ts", "packages/next/src/server/next.ts", "test/production/custom-server/app/1/page.js", "test/production/custom-server/app/layout.js", "test/production/custom-server/custom-server.test.ts", "test/production/custom-server/pages/2.js"]
[NEXT-1152] TypeError: Cannot read properties of null (reading 'useContext') [Next js 13.4.1 throwing this error while using framer motion]
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 20.6.0: Wed Jan 12 22:22:42 PST 2022; root:xnu-7195.141.19~2/RELEASE_X86_64 Binaries: Node: 20.1.0 npm: 9.6.6 Yarn: 1.22.18 pnpm: N/A Relevant packages: next: 13.4.1 eslint-config-next: 13.4.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue none ### To Reproduce Use "Framer motion" in next JS 13.14.1 version ### Describe the Bug ``` TypeError: Cannot read properties of null (reading 'useContext') at exports.useContext (/vercel/path0/node_modules/react/cjs/react.production.min.js:24:118) at MotionComponent (file:///vercel/path0/node_modules/framer-motion/dist/es/motion/index.mjs:34:16) at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:118:245) at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) at He (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:123:155) at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:122:100) at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:222) at He (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:123:155) at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:115:215) at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error TypeError: Cannot read properties of null (reading 'useContext') at exports.useContext (/vercel/path0/node_modules/react/cjs/react.production.min.js:24:118) at MotionComponent (file:///vercel/path0/node_modules/framer-motion/dist/es/motion/index.mjs:34:16) at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:118:245) at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) at He (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:123:155) at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:122:100) at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:222) at He (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:123:155) at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:115:215) at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) info - Generating static pages (3/3) > Export encountered errors on following paths: / error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Error: Command "yarn run build" exited with 1 Deployment completed BUILD_UTILS_SPAWN_1: Command "yarn run build" exited with 1 ``` Getting this error log every time after trying to deploy the code in vercel. Downgrading Next JS version to 13.3.1 solved the issue. ### Expected Behavior Should have worked regardless of the version of Next JS. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1152](https://linear.app/vercel/issue/NEXT-1152/typeerror-cannot-read-properties-of-null-reading-usecontext-[next-js)</sub>
https://github.com/vercel/next.js/issues/49355
https://github.com/vercel/next.js/pull/49805
a09dc5f268d2db55e07644ce24b3bf92c62643d3
c7e5d767177b862506648fa87d96e80b7c358719
"2023-05-06T06:35:45Z"
javascript
"2023-05-18T01:31:43Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,338
["packages/next/src/build/utils.ts"]
"TypeError: handler is not a function at Server" deploying to Google Cloud Run
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:46 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6020 Binaries: Node: 18.15.0 npm: 9.5.0 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.4.1-canary.2 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) Middleware / Edge (API routes, runtime), Standalone mode (output: "standalone") ### Link to the code that reproduces this issue https://github.com/vercel/next.js/tree/canary/examples/with-docker ### To Reproduce 1. Clone the example repo [with Docker](https://github.com/vercel/next.js/tree/canary/examples/with-docker) 2. Build the image using `docker build -t eu.gcr.io/{PROJECT-ID}/nextjs-docker .` 3. Push the image to the Google Cloud Registry `docker push eu.gcr.io/{PROJECT-ID}/nextjs-docker` 4. Go to Google Cloud Console > Cloud Run and create a new service using the image just pushed 5. Wait for service creation, go to the URL, and you will get the "Internal Server Error". ### Describe the Bug Everytime Cloud Run service cold starts, you will get an "Internal Server Error". This is the error printed in the logs: > TypeError: handler is not a function at Server.<anonymous> (/app/server.js:29:11) at Server.emit (node:events:513:28) at parserOnIncoming (node:_http_server:1091:12) at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) It looks like the server receives a request just before the handler is initialized with the function "createServerHandler". If you refresh the page sometimes the error disappears and the page is shown correctly. This seems an error that occurs only when the service cold starts. ### Expected Behavior The page is shown without any error. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/49338
https://github.com/vercel/next.js/pull/49548
ec6cdb3987964539dac5403016021a48c97e0eae
0f332055d43fa97acbb52d7a9c187850bc08073f
"2023-05-05T21:25:25Z"
javascript
"2023-05-11T17:36:40Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,334
["packages/next/src/server/lib/router-server.ts", "test/e2e/socket-io/app/layout.js", "test/e2e/socket-io/app/page.js", "test/e2e/socket-io/index.test.js", "test/e2e/socket-io/pages/api/socket.js"]
[NEXT-1119] Socket.IO Not working anymore from Next.js 13.2.5-canary.27 to latest Next.js 13.4.1
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.1-canary.2 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 warn - Latest canary version not detected, detected: "13.4.1-canary.2", newest: "13.4.1". Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue. Read more - https://nextjs.org/docs/messages/opening-an-issue ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/nextjs-socketio-u89y82?file=%2Fpackage.json&selection=%5B%7B%22endColumn%22%3A1%2C%22endLineNumber%22%3A4%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A4%7D%5D ### To Reproduce ## Agenda of this project? - To setup the Socket.Io server and share the information from one client to another user socket.io events ## The App is have the following things - - An api for initialising the Socket.Io server - inside /pages/api/socketio - A client page to connect to this server - inside /app/page ## Whats the Issue? - There has been an unknown error in network connection from client side when its trying to create the Socket.Io connection. ## Since when this issue is happening? - This has been happening from Next.js version 13.2.5-canary.27 version and its still happening even in latest canary release 13.4.1-canary.2 and also the latest release Next.js 13.4.1 ## Do we have an Example project? - Yes, I have created a testing project in codesandbox, that I have already shared. ([Link](https://codesandbox.io/p/sandbox/nextjs-socketio-u89y82?file=%2Fpackage.json&selection=%5B%7B%22endColumn%22%3A1%2C%22endLineNumber%22%3A4%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A4%7D%5D)) ## Steps to Reproduce - Just see the console and network tabs for the client connection error. It will happen to all the versions on and above 13.2.5-canary.27 - And to see if its fixed, you need to downgrade to 13.2.5-canary.26 ## Some References PR for / might this issue have created? - I some how gathered the PR for the version when this Socket.Io broken (i.e. 13.2.5-canary.27) - [See here](https://github.com/vercel/next.js/pull/47208#issuecomment-1524565169) ### Describe the Bug - There has been an unknown error in network connection from client side when its trying to create the Socket.Io connection. ### Expected Behavior - There should be successful Socket.Io connection. - It should exactly work the same way as it was working 13.2.5-canary.26 or lower. - I was using 13.2.4 as stable version for our production application, as we had to use Socket.Io for websocket connection. ### Which browser are you using? (if relevant) I am using latest Chrome version, but this has to do more with Next.js Core server. It has nothing to do with any browsers. ### How are you deploying your application? (if relevant) Using Docker, but this is irrelevant too, as in localhost also, there is this issue. <sub>[NEXT-1119](https://linear.app/vercel/issue/NEXT-1119/socketio-not-working-anymore-from-nextjs-1325-canary27-to-latest)</sub>
https://github.com/vercel/next.js/issues/49334
https://github.com/vercel/next.js/pull/57245
4a37c2d1a15e28f4780e304401eb453f2eff9d62
eb4b41e513642cf1064731abef28b939df40bba8
"2023-05-05T20:05:59Z"
javascript
"2023-10-23T17:23:34Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,316
["packages/next/src/lib/metadata/clone-metadata.ts", "packages/next/src/lib/metadata/resolve-metadata.ts", "test/e2e/app-dir/metadata/app/opengraph/article/layout.tsx", "test/e2e/app-dir/metadata/app/opengraph/article/page.tsx", "test/e2e/app-dir/metadata/metadata.test.ts"]
[NEXT-1094] openGraph parent Metadata merging
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 18.12.1 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.1 eslint-config-next: 13.4.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) Metadata (metadata, generateMetadata, next/head, head.js) ### Link to the code that reproduces this issue https://github.com/bfourgeaud/metadata-merge-repro ### To Reproduce 1. Clone, Install & start reproduction project 2. Go to http://localhost:3000 3. The Metadata Infos are OK, no error 4. Go to /child page (link on home page) 5. The error is there ### Describe the Bug Merging of openGraph `ResolvedMetadata `object into `Metadata `is throwing an error. Mainly because of images parameter which is not retrieved correctly from parent it seems. Also url parameter cannot be spread to Metadata and has to be redefined. ```ts export async function generateMetadata(props, parent?: ResolvingMetadata):Promise<Metadata> { const parentOpenGraph = (await parent)?.openGraph return { title: "Child", openGraph: { ...parentOpenGraph, title: "Child", url: "" } } } ``` ### Expected Behavior It should be possible to merge the parent Metadata (ResolvedMetadata) into the current Metadata. Both objects should be of compatible types. ### Which browser are you using? (if relevant) chrome ### How are you deploying your application? (if relevant) VSCode, Vercel <sub>[NEXT-1094](https://linear.app/vercel/issue/NEXT-1094/opengraph-parent-metadata-merging)</sub>
https://github.com/vercel/next.js/issues/49316
https://github.com/vercel/next.js/pull/49343
e6cfc155a70b5cfe2ac89d2233fda7738d1614d5
5b5c4c320988b06dc2e9a49e88390fb49310d2b6
"2023-05-05T16:09:06Z"
javascript
"2023-05-08T18:47:41Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,310
["packages/next/src/server/lib/server-ipc/utils.ts", "test/e2e/app-dir/app-routes/app-custom-routes.test.ts", "test/e2e/app-dir/app-routes/app/advanced/body/json/route.ts"]
[NEXT-1114] `content-length` is gone from requests since 13.4.0
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: 3.5.1 pnpm: N/A Relevant packages: next: 13.4.1 eslint-config-next: 13.3.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/magical-euler-zto6yv ### To Reproduce Try to access `req.headers['content-length']` ### Describe the Bug `req.headers['content-length']` is undefined. ### Expected Behavior `req.headers['content-length']` should be defined, and be the byte length of the body. <sub>[NEXT-1114](https://linear.app/vercel/issue/NEXT-1114/content-length-is-gone-from-requests-since-1340)</sub>
https://github.com/vercel/next.js/issues/49310
https://github.com/vercel/next.js/pull/51874
363b2368b3da9e32350c8dfb0498d5f1737cc2d0
7dfa56c7141ae2556af0d7fd837e0af686d8fa55
"2023-05-05T14:30:21Z"
javascript
"2023-06-27T11:44:01Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,261
["packages/next/src/build/index.ts"]
Build error on Vercel deployments after upgrading to 13.4
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 Binaries: Node: 16.13.2 npm: 9.6.4 Yarn: 3.4.1 pnpm: 7.21.0 Relevant packages: next: 13.4.0 eslint-config-next: 13.4.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue none ### To Reproduce Upgrade `next` from `^13.3.4` tp `^13.4.0`. The project is using `pages/`, not using `app/`dir nor turbopack. ### Describe the Bug I just updated the nextJS version from 13.3 to 13.4 without change anything in my codebase. The local build is successful without any errors, but when deployed on Vercel, I got hundreds of lines of error like ```sh Error occurred prerendering page "/en/post/100". Read more: https://nextjs.org/docs/messages/prerender-error TypeError: Cannot read properties of null (reading 'useEffect') at exports.useEffect (/vercel/path0/node_modules/react/cjs/react.production.min.js:24:292) at Analytics (file:///vercel/path0/node_modules/@vercel/analytics/dist/react/index.js:132:3) at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:114:273) at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) at He (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:123:155) at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:122:100) at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:222) at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:119:95) at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91) at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:115:9) ``` I speculate that this is caused by my components not being specified as client components. But I am not using the `app/ ` directory, I am only using the `/pages`. Does that mean I need to specify client components even if I am using /pages? I tried adding 'use client' to the top of my component files and the error still persists. The local builds are successful without any errors, this only happens on Vercel deployments. ### Expected Behavior Build should be successful with no error. ### Which browser are you using? (if relevant) irrelevant ### How are you deploying your application? (if relevant) Vercel
https://github.com/vercel/next.js/issues/49261
https://github.com/vercel/next.js/pull/49274
25a9547cad82e2aea730ce646388786a0d4a0703
618dc2ee631ccc390cdfb6871c40e9ab2c50b627
"2023-05-05T00:17:28Z"
javascript
"2023-05-05T10:40:23Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,259
["packages/next/src/server/web/spec-extension/adapters/request-cookies.ts"]
[NEXT-1090] Property 'set' does not exist on type 'ReadonlyRequestCookies'.
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Thu Apr 6 19:47:04 UTC 2023 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: 1.22.19 pnpm: 8.3.1 Relevant packages: next: 13.4.1-canary.1 eslint-config-next: 13.4.1-canary.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/divine-firefly-4si8qm?file=%2Fpackage.json ### To Reproduce https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#using-headers ### Describe the Bug The docs state that we can set cookies within a server action. but it's readonly ![image](https://user-images.githubusercontent.com/30637426/236352894-e830cbfd-d6de-4315-bad5-18d90e17fbd0.png) https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#using-headers ### Expected Behavior I want to be able to do what the docs says: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#using-headers ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1090](https://linear.app/vercel/issue/NEXT-1090/property-set-does-not-exist-on-type-readonlyrequestcookies)</sub>
https://github.com/vercel/next.js/issues/49259
https://github.com/vercel/next.js/pull/49806
afddb6ebdade616cdd7780273be4cd28d4509890
ca32decdadf57efb6c6eca092e7303a039fdfd37
"2023-05-04T23:47:20Z"
javascript
"2023-05-15T13:07:49Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,169
["packages/next/src/build/index.ts"]
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports"
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 18.15.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.5-canary.6 eslint-config-next: 13.3.2 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue sorry i can't upload because my project contains localhost database connections ### To Reproduce On my own server.js file, every page of my application in development mode gets the same error, while on my own server.js file in localhost in production mode, I get this error on the pages under [slug]! When I run this with my server.js file I get this error. While it then worked on 13.3.1, it's now broken! What am I missing in my server.js file or what should I do? I got this error in the last 13.3.2-canary.7 and it continued in later versions! Normally, I get this error when I refresh the pages under news-media/[slug] and other pages under news-media/[slug] while opening in production mode. I get this error on every page in development mode!"dev": "next dev", "build": "next build", While "start": "next start" was OK, as I mentioned above on my server.js file, after the "next 13.3.1" version, errors started on server.js both in development and production mode! Here's my run npm commands for my own server.js: "httpsDevelopment": "node --max_old_space_size=8192 server/server.js", "httpsProduction": "next build && node server/server.js production", My server.js file looks like this: ![Screenshot_20](https://user-images.githubusercontent.com/57527680/236021249-857e29e4-29b8-46a3-84c1-cb53ee871af4.png) ``` const { createServer } = require('https') const { parse } = require('url') const next = require('next') const fs = require('fs') const dev = process.argv[2] !== 'production' const serverProduct = process.argv[3] === 'server' || undefined process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' const hostname = 'localhost' const port = 443 // when using middleware hostname and port must be provided below const app = next({ dev, hostname, port }) const handle = app.getRequestHandler() const httpsOptions = { key: fs.readFileSync(./server/certificates/${serverProduct ? 'cloudflare.key' : 'server.key'}), cert: fs.readFileSync(./server/certificates/${serverProduct ? 'cloudflare.pem' : 'server.crt'}), } app.prepare().then(() => { createServer(httpsOptions, async (req, res) => { try { const parsedUrl = parse(req.url, true) await handle(req, res, parsedUrl).then(null) } catch (err) { console.error('Error occurred handling', req.url, err) res.statusCode = 500 res.end('internal server error') } }) .once('error', (err) => { console.error(err) process.exit(1) }) .listen(port, () => { console.log(> Ready on https://${hostname}) }) }) ``` ### Describe the Bug What am I missing in my server.js file or what should I do? I got this error in the last 13.3.2-canary.7 and it continued in later versions! Normally, I get this error when I refresh the pages under news-media/[slug] and other pages under news-media/[slug] while opening in production mode. I get this error on every page in development mode!"dev": "next dev", "build": "next build", While "start": "next start" was OK, as I mentioned above on my server.js file, after the "next 13.3.1" version, errors started on server.js both in development and production mode! While in development: ![dev1](https://user-images.githubusercontent.com/57527680/236022051-f605ac5c-c036-4233-9f7f-905ed6d126e5.png) ![dev2](https://user-images.githubusercontent.com/57527680/236022086-5d5d5385-595a-482d-8c25-0cd1895865c1.png) While in production: ![prod1](https://user-images.githubusercontent.com/57527680/236022209-3472fef9-1126-4f17-93f9-55380b4997f4.png) ![prod2](https://user-images.githubusercontent.com/57527680/236022218-4e324f34-d69b-49f3-b474-f74c7260e629.png) ### Expected Behavior I expect it to run smoothly on my own server.js file, both in development and production mode. I have 2 similar tickets closed. But the problem persists in a similar way! ### Which browser are you using? (if relevant) Chrome 112.0.5615.138 ### How are you deploying your application? (if relevant) on my localhost with the command "next build && node server/server.js production". or "node --max_old_space_size=8192 server/server.js" <sub>[NEXT-1413](https://linear.app/vercel/issue/NEXT-1413/error-[err-package-path-not-exported]-package-subpath-serveredge-is)</sub>
https://github.com/vercel/next.js/issues/49169
https://github.com/vercel/next.js/pull/49954
c2da56e1941e8dc09bf3c1352474ecd0ce973d04
ea9b1f5ebcbdc0dbcce5aad38a51fec4908a4680
"2023-05-03T19:24:05Z"
javascript
"2023-05-18T23:51:18Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,162
["packages/next/src/build/entries.ts", "packages/next/src/build/webpack/loaders/metadata/discover.ts", "packages/next/src/build/webpack/loaders/next-app-loader.ts", "packages/next/src/build/webpack/loaders/next-metadata-image-loader.ts", "packages/next/src/server/dev/hot-reloader.ts", "test/e2e/app-dir/app-basepath/app/another/opengraph-image.png", "test/e2e/app-dir/app-basepath/index.test.ts"]
[NEXT-1087] Next OpenGraph Image not working with basePath
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 Binaries: Node: 18.15.0 npm: 9.5.0 Yarn: 1.22.19 pnpm: 8.3.1 Relevant packages: next: 13.3.4 eslint-config-next: 13.3.4 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://github.com/josepholiveira/next13-opengraph-image-basepath-bug ### To Reproduce - Clone repository - npm i - npm run dev - Go to page `localhost:3000/test` (/test is the basePath in next.config.js) - Inspect element or use an Metadata checker to see that the opengraph-image.jpg does not have the basePath in the beginning, so it won't ever be loaded correctly. - Alternatively you can just deploy and share the URL in discord or any other page, and see that the image is not embedded ### Describe the Bug When using the NextJs app folder, with the Metadata API, we can create files named `opengraph-image.(jpg|jpeg|png|gif)`, it works like a charm but not when setting up a basePath in the `next.config.js` file. Giving an example, when not using the basePath, the image is added like this to the og:image field: http://localhost:3000/opengraph-image-1vqp9l.jpg?d41089021927a9d2 ![image](https://user-images.githubusercontent.com/39345247/235986665-fbc53409-2261-4a5f-8345-37c2c0cfef3c.png) But when using the basePath, accessing this URL is not valid and it will not work, but when trying to access manually adding the basePath to the URL, it works: http://localhost:3000/test/opengraph-image-1vqp9l.jpg?d41089021927a9d2 ![image](https://user-images.githubusercontent.com/39345247/235986634-03c1057b-f546-4811-9767-7e5629a4c908.png) But NextJS is currently, despite setting up the basePath in next.config.js, not adding the basePath automatically when we use the opengraph-image. Also, adding here, another bug is that it always considers `3000` as the port, but I was using 3001 that was another reason it didn't work locally. ![image](https://user-images.githubusercontent.com/39345247/235987058-8c9afa11-d176-4893-87ec-775de0b8e554.png) ### Expected Behavior I expected Next to automatically handle the basePath for the opengraph-image. ### Which browser are you using? (if relevant) Chrome ### How are you deploying your application? (if relevant) Vercel <sub>[NEXT-1087](https://linear.app/vercel/issue/NEXT-1087/next-opengraph-image-not-working-with-basepath)</sub>
https://github.com/vercel/next.js/issues/49162
https://github.com/vercel/next.js/pull/49226
7f6e8dbeed1651667e6167975d59a99f2b3f5385
7fa4946b4254906f466cfe556ee00102b73b7b0c
"2023-05-03T16:59:44Z"
javascript
"2023-05-04T19:50:13Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,079
["packages/next/src/build/webpack/plugins/next-types-plugin.ts"]
Runtime in layout gives type error
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:58 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6020 Binaries: Node: 19.3.0 npm: 9.2.0 Yarn: 1.22.18 pnpm: 8.3.1 Relevant packages: next: 13.3.5-canary.2 eslint-config-next: 13.2.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Middleware / Edge (API routes, runtime) ### Link to the code that reproduces this issue https://github.com/devhuset/layout-runtime ### To Reproduce - Install app dir reproduction template - Add `export const runtime = "edge";` and `export const preferredRegion = "fra1";` to the root layout ### Describe the Bug I get a type error when deploying to Vercel: Type error: Layout "app/layout.tsx" does not match the required types of a Next.js Layout. -- 12:03:58.766 | "runtime" is not a valid Layout export field. ### Expected Behavior I thought #48959 added support for `runtime` and `preferredRegion` in layouts, but it does not work with the latest canary when I try to deploy it. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) Vercel
https://github.com/vercel/next.js/issues/49079
https://github.com/vercel/next.js/pull/49117
9102771c655e511382a16e49837c5bd4c8b2cfa4
2994668bbb7458fa26b107f056f75d090ac6ff99
"2023-05-02T10:09:32Z"
javascript
"2023-05-02T23:14:46Z"
closed
vercel/next.js
https://github.com/vercel/next.js
49,059
["packages/next/src/build/index.ts", "test/integration/app-dir-export/test/config.test.ts", "test/integration/app-dir-export/test/dynamicapiroute-dev.test.ts", "test/integration/app-dir-export/test/dynamicapiroute-prod.test.ts", "test/integration/app-dir-export/test/dynamicpage-dev.test.ts", "test/integration/app-dir-export/test/dynamicpage-prod.test.ts", "test/integration/app-dir-export/test/start.test.ts", "test/integration/app-dir-export/test/trailing-slash-dev.test.ts", "test/integration/app-dir-export/test/trailing-slash-start.test.ts"]
[NEXT-1092] `next build` compile error regarding export worker
### Verify canary release * [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ``` Operating System: Platform: win32 Arch: x64 Version: Windows 11 Pro Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: N/A pnpm: 8.4.0 Relevant packages: next: 13.4.1-canary.2 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Package manager (npm, pnpm, Yarn), Static HTML Export (output: "export") ### Link to the code that reproduces this issue [https://github.com/Kazzuk/reproduce](https://github.com/Kazzuk/reproduce) ### To Reproduce * Ensure `output` is set to "export" in `next.config.js` to cause error. * Run `pnpm build`. ### Describe the Bug Whenever `output` is set to "export" in `next.config.js` and you build the project you will be met with the below error. If I was to remove `output` from `next.config.js` the project compiles fine. As well if remove the dynamic routes (delete `blog` folder) from the project while `output` is set to "export" the project compiles fine. ``` > Build error occurred Error: invariant: Undefined export worker for app dir, this is a bug in Next.js. at C:\Users\Kazuk\Documents\GitHub\reproduce\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\export\index.js:506:27 at Span.traceAsyncFn (C:\Users\Kazuk\Documents\GitHub\reproduce\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\trace\trace.js:103:26) at C:\Users\Kazuk\Documents\GitHub\reproduce\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\export\index.js:502:35 at Array.map (<anonymous>) at C:\Users\Kazuk\Documents\GitHub\reproduce\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\export\index.js:499:41 at async Span.traceAsyncFn (C:\Users\Kazuk\Documents\GitHub\reproduce\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\trace\trace.js:103:20) at async C:\Users\Kazuk\Documents\GitHub\reproduce\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\index.js:1887:17 at async Span.traceAsyncFn (C:\Users\Kazuk\Documents\GitHub\reproduce\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\trace\trace.js:103:20) at async build (C:\Users\Kazuk\Documents\GitHub\reproduce\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\index.js:143:29) ``` ### Expected Behavior Build should be successful. ### Which browser are you using? (if relevant) *No response* ### How are you deploying your application? (if relevant) *No response* <sub>From [SyncLinear.com](https://synclinear.com) | [NEXT-1092](https://linear.app/vercel/issue/NEXT-1092/next-build-compile-error-regarding-export-worker)</sub>
https://github.com/vercel/next.js/issues/49059
https://github.com/vercel/next.js/pull/49311
660d531b6abe626752886e53ec7e4b6bdb9f09c9
1c005eb303bbcd8a46df99bf2e50b2342103c698
"2023-05-01T21:43:10Z"
javascript
"2023-05-08T17:38:33Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,991
["packages/next/src/build/analysis/get-page-static-info.ts", "packages/next/src/build/index.ts", "packages/next/src/build/webpack/loaders/next-metadata-route-loader.ts", "test/e2e/app-dir/metadata-dynamic-routes/index.test.ts"]
[NEXT-1071] Static sitemap route is not optimized as static
### Verify canary release * [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ``` Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 20.0.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.2 eslint-config-next: 13.3.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js) ### Link to the code that reproduces this issue Install a standard Next.js setup v13.3.2 and use static export + new appDir and add an `app/sitemap.ts` file. `next.config.js` file : ```js /** @type {import('next').NextConfig} */ const nextConfig = { output: 'export', pageExtensions: ['ts', 'tsx', 'js', 'jsx'], reactStrictMode: true, swcMinify: true, // Note: This feature is required to use NextJS Image in SSG mode. // See https://nextjs.org/docs/messages/export-image-api for different workarounds. images: { unoptimized: true, }, experimental: { appDir: true, }, } ``` ### To Reproduce * Static export output mode. * Using the new appDir experimental. * Version 13.3.2 (currently latest version). * Windows 10 (no WSL). When running `npm run build`, sitemap isn't generated. In development mode, the sitemap is accessible. `app/sitemap.ts` file : ```ts import { MetadataRoute } from 'next' import { allBlogs } from '@/.contentlayer/generated' export default async function sitemap(): Promise<MetadataRoute.Sitemap> { const blogs = allBlogs.map(post => ({ url: `http://localhost:3000/blog/${post.slug}`, lastModified: post.publishedAt, })) const routes = ['', '/blog', '/contact'].map(route => ({ url: `http://localhost:3000${route}`, lastModified: new Date().toISOString().split('T')[0], })) return [...routes, ...blogs] } ``` Build log : ``` Route (app) Size First Load JS β”Œ β—‹ / 175 B 81.7 kB β”œ ● /blog/[slug] 2.5 kB 84 kB β”œ β”œ /blog/post-0002 β”œ β”” /blog/post-0001 β”œ β—‹ /robots.txt 0 B 0 B β”” Ξ» /sitemap.xml/[[...__metadata_id__]] 0 B 0 B + First Load JS shared by all 75.9 kB β”œ chunks/139-95fe43fc14e42daa.js 23.6 kB β”œ chunks/2443530c-dfeca1b6f38a1e91.js 50.5 kB β”œ chunks/main-app-06da1dca58d74c34.js 214 B β”” chunks/webpack-d9bdffe382ff608b.js 1.69 kB Route (pages) Size First Load JS ─ β—‹ /404 178 B 86 kB + First Load JS shared by all 85.8 kB β”œ chunks/main-470121997414b370.js 83.9 kB β”œ chunks/pages/_app-c544d6df833bfd4a.js 192 B β”” chunks/webpack-d9bdffe382ff608b.js 1.69 kB Ξ» (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps) β—‹ (Static) automatically rendered as static HTML (uses no initial props) ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps) ``` As you can see, sitemap end up with a weird filename `/sitemap.xml/[[...__metadata_id__]]` and it didn't write to the file system. Robots is fine, but sitemap doesn't end up in the out folder in production build. ### Describe the Bug A sitemap isn't generated in the out folder when runnning `npm run build`. ### Expected Behavior A sitemap should be generated in the out folder when runnning `npm run build`. ### Which browser are you using? (if relevant) *No response* ### How are you deploying your application? (if relevant) *No response* <sub>From [SyncLinear.com](https://synclinear.com) | [NEXT-1071](https://linear.app/vercel/issue/NEXT-1071/sitemap-not-generated)</sub>
https://github.com/vercel/next.js/issues/48991
https://github.com/vercel/next.js/pull/49109
9dc0c1e2ffb0b2398906de8589b8d701b30cf1f9
9102771c655e511382a16e49837c5bd4c8b2cfa4
"2023-04-29T20:48:12Z"
javascript
"2023-05-02T21:36:44Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,964
["packages/next/src/cli/next-dev.ts"]
TypeError: Cannot set properties of undefined (setting 'current')
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 18.15.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.2-canary.12 eslint-config-next: 13.3.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue sorry i can't upload because my project contains localhost database connections ### To Reproduce While I get the same error on every page in development mode, I get this error on pages under [slug] in production mode as a result of refreshing the page! I get this error when I run it with my server.js file. While next worked in 13.3.1, it's now broken! My server.js file looks like this: ![Screenshot_20](https://user-images.githubusercontent.com/57527680/235193368-a212c8d3-affb-4819-9e6d-7b4b38d17e23.png) ``` const { createServer } = require('https') const { parse } = require('url') const next = require('next') const fs = require('fs') const dev = process.argv[2] !== 'production' const serverProduct = process.argv[3] === 'server' || undefined process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' const hostname = 'localhost' const port = 443 // when using middleware hostname and port must be provided below const app = next({ dev, hostname, port }) const handle = app.getRequestHandler() const httpsOptions = { key: fs.readFileSync(./server/certificates/${serverProduct ? 'cloudflare.key' : 'server.key'}), cert: fs.readFileSync(./server/certificates/${serverProduct ? 'cloudflare.pem' : 'server.crt'}), } app.prepare().then(() => { createServer(httpsOptions, async (req, res) => { try { const parsedUrl = parse(req.url, true) await handle(req, res, parsedUrl).then(null) } catch (err) { console.error('Error occurred handling', req.url, err) res.statusCode = 500 res.end('internal server error') } }) .once('error', (err) => { console.error(err) process.exit(1) }) .listen(port, () => { console.log(> Ready on https://${hostname}) }) }) ``` ### Describe the Bug What am I missing in my server.js file or what should I do? I got this error in the last 13.3.2-canary.7 and it continued in later versions! Normally, I get this error when I refresh the pages under news-media/[slug] and other pages under news-media/[slug] while opening in production mode. I get this error on every page in development mode! While in development: ![dev1](https://user-images.githubusercontent.com/57527680/235191282-c2a79a40-53ec-42f2-91fd-06a309ccc3d0.png) ![dev2](https://user-images.githubusercontent.com/57527680/235191289-bb66438f-a24e-40b8-b8c2-be8f045125bf.png) While in production: ![product1](https://user-images.githubusercontent.com/57527680/235191290-db10dc4a-ff57-4443-a85e-3ae58f706e8c.png) ![product2](https://user-images.githubusercontent.com/57527680/235191292-8bd170c7-1b46-4722-8282-dc32def3364c.png) ### Expected Behavior I'm waiting for my server.js file and my pages to load properly in both production and development mode. I had stated the same mistake in my previous notification, but another topic was written under my error report and it must be for that error, my report was closed! Do not do this. I can't understand why my issue is getting closed when another bug is fixed? ### Which browser are you using? (if relevant) Chrome 112.0.5615.138 ### How are you deploying your application? (if relevant) on my localhost with the command "next build && node server/server.js production".
https://github.com/vercel/next.js/issues/48964
https://github.com/vercel/next.js/pull/49056
58e5c780f33d22bc8300b1d5d8ed4065c62645e2
45030d62adb75f3b5961073621aca55754c5029c
"2023-04-28T15:42:15Z"
javascript
"2023-05-01T21:40:24Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,948
["packages/next/src/build/index.ts", "packages/next/src/server/next.ts", "test/e2e/app-dir/navigation/navigation.test.ts"]
Package subpath './server.edge' is not defined by "exports"
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Enterprise Binaries: Node: 16.18.1 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.2-canary.12 eslint-config-next: 13.3.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://github.com/medonat/nextjs-revalidate-test ### To Reproduce 1. Clone the repository 2. npm install 3. npm run build 4. npm run start 5. Open localhost:3000 6. The cat fact shouldn't change onreload 7. Make a POST request: localhost:3000/api/revalidate 8. There should be an error 500 and no update if you reload localhost:3000 9. Checkout branch 13.3.0 - and repeat the procedure to see that it worked in 13.3.0 ### Describe the Bug ISR does not work. Stale data is displayed after calling revalidate. Error in console: `TypeError: Cannot set properties of undefined (setting 'current') at ue (C:\Users\daniel.hufler\Documents\code\revalidatetest\node_modules\next\dist\compiled\react-dom\cjs\react-dom-server.edge.production.min.js:113:42) at C:\Users\daniel.hufler\Documents\code\revalidatetest\node_modules\next\dist\compiled\react-dom\cjs\react-dom-server.edge.production.min.js:151:127 at new Promise (<anonymous>) at Object.exports.renderToReadableStream (C:\Users\daniel.hufler\Documents\code\revalidatetest\node_modules\next\dist\compiled\react-dom\cjs\react-dom-server.edge.production.min.js:151:53) at C:\Users\daniel.hufler\Documents\code\revalidatetest\node_modules\next\dist\server\node-web-streams-helper.js:195:117 at NextTracerImpl.trace (C:\Users\daniel.hufler\Documents\code\revalidatetest\node_modules\next\dist\server\lib\trace\tracer.js:86:20) at renderToInitialStream (C:\Users\daniel.hufler\Documents\code\revalidatetest\node_modules\next\dist\server\node-web-streams-helper.js:195:37) at C:\Users\daniel.hufler\Documents\code\revalidatetest\node_modules\next\dist\server\app-render\app-render.js:918:92` ### Expected Behavior Revalidate should work like it did in previous versions (e.g. 13.3.0) ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) next start
https://github.com/vercel/next.js/issues/48948
https://github.com/vercel/next.js/pull/49168
39654fd4bb91c0c7b650e4e1caf88f3b58f53c53
248f2defc20f98510d2c52ffeec14cc038eb9fae
"2023-04-28T11:22:41Z"
javascript
"2023-05-03T22:40:23Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,872
["packages/next/src/build/index.ts"]
TypeError in 13.3.2-canary.7: Cannot read properties of undefined (reading 'current') error.
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 18.15.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.2-canary.7 eslint-config-next: 13.3.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue sorry i can't upload because my project contains localhost database connections ### To Reproduce While there is no problem in the pages that do not contain a subpage such as contact-us in the src/app directory, I get the error "error - TypeError: Cannot read properties of undefined (reading 'current')" in the pages under the news-media/[slug] folder. This error also happens on my page in news-media/[slug]. When I do next build and then next start, I don't get such errors in localhost:3000, but I get these errors in my own configuration "next build && node server/server.js production". My server.js file looks like this: ``` const { createServer } = require('https') const { parse } = require('url') const next = require('next') const fs = require('fs') const dev = process.argv[2] !== 'production' const serverProduct = process.argv[3] === 'server' || undefined process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' const hostname = 'localhost' const port = 443 // when using middleware hostname and port must be provided below const app = next({ dev, hostname, port }) const handle = app.getRequestHandler() const httpsOptions = { key: fs.readFileSync(./server/certificates/${serverProduct ? 'cloudflare.key' : 'server.key'}), cert: fs.readFileSync(./server/certificates/${serverProduct ? 'cloudflare.pem' : 'server.crt'}), } app.prepare().then(() => { createServer(httpsOptions, async (req, res) => { try { const parsedUrl = parse(req.url, true) await handle(req, res, parsedUrl).then(null) } catch (err) { console.error('Error occurred handling', req.url, err) res.statusCode = 500 res.end('internal server error') } }) .once('error', (err) => { console.error(err) process.exit(1) }) .listen(port, () => { console.log(> Ready on https://${hostname}) }) }) ``` ### Describe the Bug What is missing in my server.js file or what do I need to do last 13.3.2-canary.7 I got this error. Normally, the pages under news-media/[slug] open, but when I refresh the page, I get the error "TypeError: Cannot read properties of undefined (reading 'current') 500 Internal Server Error. " ![Screenshot_17](https://user-images.githubusercontent.com/57527680/234593239-755ea990-0abe-4112-a6d6-d180cdcd63be.png) ### Expected Behavior What is missing in my server.js file or what do I need to do last 13.3.2-canary.7 I got this error. Normally, the pages under news-media/[slug] open, but when I refresh the page, I get the error "TypeError: Cannot read properties of undefined (reading 'current') 500 Internal Server Error. " ### Which browser are you using? (if relevant) Chrome 112.0.5615.138 ### How are you deploying your application? (if relevant) on my localhost with the command "next build && node server/server.js production".
https://github.com/vercel/next.js/issues/48872
https://github.com/vercel/next.js/pull/48902
f4a01b4b0e90fb1704b6a29d6dacf7863f8a87c6
073a1753d0fa8fe19c6e91cefef2828de717f604
"2023-04-26T13:43:19Z"
javascript
"2023-04-27T03:28:51Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,852
["packages/next/src/client/components/layout-router.tsx", "packages/next/src/client/components/router-reducer/reducers/navigate-reducer.ts"]
[NEXT-1053] Scrolling doesn't work in production build with `app`
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 18.14.0 npm: 9.4.1 Yarn: 1.22.19 pnpm: 7.6.0 Relevant packages: next: 13.3.2-canary.6 eslint-config-next: 13.3.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://github.com/aptabase/buildwith.app ### To Reproduce Clone https://github.com/aptabase/buildwith.app and run locally. It'll scroll to top on every page navigation because scrollRestoration is false. Visit https://buildwith.app/ (hosted on Vercel). Navigation between pages does not scroll to top ### Describe the Bug Navigation between pages does not scroll to top when scrollRestoration is false and hosted on Vercel. ### Expected Behavior Navigation between pages should scroll to top when scrollRestoration is false and hosted on Vercel. ### Which browser are you using? (if relevant) Brave 112.0.5615.138 and Safari 16.4 ### How are you deploying your application? (if relevant) Vercel <sub>[NEXT-1053](https://linear.app/vercel/issue/NEXT-1053/scrollrestoration-doesnt-work-when-deployed-to-vercel)</sub>
https://github.com/vercel/next.js/issues/48852
https://github.com/vercel/next.js/pull/48863
6902e5b547145dd2b40c9a2e99f60cdfe7261b6d
da2804f9746c9e676d2ae4a9f619c2c5f9f62d7d
"2023-04-26T06:33:01Z"
javascript
"2023-04-26T12:33:58Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,807
["packages/next/src/client/app-link-gc.ts", "packages/next/src/server/app-render/app-render.tsx", "test/e2e/app-dir/app-css/index.test.ts"]
Recently fixed CSS ordering issue is re-corrupted on hot reload
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 Binaries: Node: 18.12.1 npm: 8.19.2 Yarn: 3.5.0 pnpm: 8.1.1 Relevant packages: next: 13.3.2-canary.5 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://github.com/meebix/repro-nextjs-css-order ### To Reproduce 1. Load the app at http://localhost:3000 2. Notice the styled button when the page loads 3. Using your editor (VSCode), save the `page.tsx` file which will trigger a hot-reload of the dev server 4. Notice the button has disappeared ### Describe the Bug When the Next dev server performs a hot reload, the CSS ordering is corrupted. The original CSS ordering issue in Next.js was recently fixed via [this PR](https://github.com/vercel/next.js/pull/48244). However, it appears there is more to the issue, which I am raising. (CC @shuding who fixed the original issue πŸ™πŸ» ) You can see from my screenshots that on initial load of the page, the CSS ordering is correct: <img width="666" alt="correct-css-order" src="https://user-images.githubusercontent.com/8016033/234162387-6d36ae48-5280-4c64-997e-e5624dd23f9c.png"> However, after a hot-reload, the ordering is corrupted: <img width="676" alt="hot-reload-corrupt-css-order" src="https://user-images.githubusercontent.com/8016033/234162426-8914a756-f6f1-45eb-aa4b-647c8b8516b1.png"> In my repro, the Button disappears because in the `layout` CSS there is button reset CSS and thus it must come first before any `page` CSS. ### Expected Behavior When the Next dev server performs a hot-reload, the CSS order should be maintained and thus not corrupted. ### Which browser are you using? (if relevant) Chrome ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/48807
https://github.com/vercel/next.js/pull/49010
8e4888f1f682d70a2fa4a534f75f7287d1e38bc2
97be2e672883a797ada61ebf0e1909816ea35c78
"2023-04-25T02:52:56Z"
javascript
"2023-04-30T20:50:58Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,767
["packages/next/src/server/lib/start-server.ts", "packages/next/src/server/lib/utils.ts", "packages/next/src/server/lib/worker-utils.ts"]
[NEXT-1179] Chrome dev tools debugging
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 16.19.0 npm: 8.19.3 Yarn: N/A pnpm: 8.3.1 Relevant packages: next: 13.3.1 eslint-config-next: 13.3.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue N/A ### To Reproduce Add a `debugger` line after running the app via `"NODE_OPTIONS='--inspect' next dev` ### Describe the Bug Happened after upgrading from next 12 to 13: - Chrome dev tools should stop execution in the debugger line. Now is not being detected, execution just continues. ### Expected Behavior Chrome dev tools should stop execution in the debugger line ### Which browser are you using? (if relevant) Chrome 112.0.5615.137 ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1179](https://linear.app/vercel/issue/NEXT-1179/chrome-dev-tools-debugging)</sub>
https://github.com/vercel/next.js/issues/48767
https://github.com/vercel/next.js/pull/51467
cb7be1912f9544dd6fb97a929211b71dd0aece31
70aad4a2b5b34fbbae006c477f96c54118da6381
"2023-04-24T08:17:43Z"
javascript
"2023-06-25T22:31:09Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,728
["packages/next/src/client/components/router-reducer/fetch-server-response.ts", "packages/next/src/server/app-render/parse-and-validate-flight-router-state.tsx", "test/e2e/app-dir/navigation/app/search-params/page.js", "test/e2e/app-dir/navigation/navigation.test.ts"]
[NEXT-1258] Search parameters with Unicode characters cause the fetching of RSC payload to fail
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 Binaries: Node: 19.1.0 npm: 9.1.2 Yarn: 1.22.19 pnpm: 8.3.1 Relevant packages: next: 13.3.1-canary.19 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://github.com/mandel59/slug-with-unicode ### To Reproduce 1. `npm run dev` 2. Open <http://localhost:3000/?q=%E3%81%82>. The page shows "q=あ" and a link to Another page. 3. Open dev console. 4. Hover your mouse cursor over the link. ### Describe the Bug The following message will be displayed: "Failed to fetch RSC payload. Falling back to browser navigation." The specific message may vary depending on the browser: - Google Chrome: `Failed to fetch RSC payload. Falling back to browser navigation. TypeError: Failed to execute 'fetch' on 'Window': Failed to read the 'headers' property from 'RequestInit': String contains non ISO-8859-1 code point.` - Firefox: `Failed to fetch RSC payload. Falling back to browser navigation. TypeError: Window.fetch: Cannot convert value in record<ByteString, ByteString> branch of (sequence<sequence<ByteString>> or record<ByteString, ByteString>) to ByteString because the character at index 36 has value 12354 which is greater than 255.` ### Expected Behavior Prefetch of Another page is successfully performed. The following image shows a prefetch request made from <http://localhost:3000/?q=test>. <img width="1142" alt="γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2023-04-23 5 46 47" src="https://user-images.githubusercontent.com/1079715/233805957-010da4e0-a91a-4ae5-97b6-cfec60375651.png"> ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1258](https://linear.app/vercel/issue/NEXT-1258/search-parameters-with-unicode-characters-cause-the-fetching-of-rsc)</sub>
https://github.com/vercel/next.js/issues/48728
https://github.com/vercel/next.js/pull/51017
96e47d3f371420fe68f7a7303a1eefe4712efd88
f19b31ad93c313cb86d9a589c931f8f9718a7fb2
"2023-04-22T20:52:54Z"
javascript
"2023-06-09T10:06:00Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,719
["packages/next/src/build/entries.ts", "packages/next/src/build/normalize-catchall-routes.ts", "packages/next/src/server/future/route-matcher-providers/dev/dev-app-page-route-matcher-provider.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-catchall/@slot/baz/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-catchall/bar/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-catchall/layout.tsx", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"]
Parallel routes do not clear slot with [...catchAll]
### Verify canary release - [x] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023 Binaries: Node: 19.7.0 npm: 9.5.0 Yarn: N/A pnpm: 8.8.0 Relevant Packages: next: 13.5.4-canary.1 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: N/A Next.js Config: output: N/A ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Routing (next/router, next/navigation, next/link) ### Link to the code that reproduces this issue https://github.com/Yukioru/next-parallel-routes-bug https://codesandbox.io/p/github/Yukioru/next-parallel-routes-bug/main https://next-parallel-routes-bug.vercel.app ### To Reproduce You have to use soft navigation 1. Click "To /overview" page 2. Slot displays correctly with contents of the "Overview Extension" 3. Click "To /demo" page 4. The slot has not cleared ![image](https://user-images.githubusercontent.com/8497115/233791410-cd5a10cd-e3f9-4f3d-b1ce-f8a48713574d.png) ### Describe the Bug Once the slot is shown, it is not cleared if the URL does not match. A similar bug has already been described in Issue: https://github.com/vercel/next.js/issues/48124, but the solution with `[...catchAll]` route did not help. The route is not called. If you do a hard navigation, you will see that the `/demo` slot segment corresponds to the default.js route, but it does not show up. ### Expected Behavior Using soft navigation (next/link) the slot should be cleared by the `[...catchAll]` route (or the `default.js` route if possible). ### Which browser are you using? (if relevant) Chrome 112.0.5615.138 ### How are you deploying your application? (if relevant) Vercel, CodeSandbox <sub>[NEXT-1394](https://linear.app/vercel/issue/NEXT-1394/parallel-routes-do-not-clear-slot-with-[catchall])</sub>
https://github.com/vercel/next.js/issues/48719
https://github.com/vercel/next.js/pull/58215
b740fe8fa4cec0e3733aa21d16e985b04fb25111
4024b25e8cc0d76d832efb14858d65718a24211e
"2023-04-22T14:49:29Z"
javascript
"2023-11-09T10:11:06Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,712
["examples/cms-sanity/studio/copyEnv.js", "examples/cms-sanity/studio/package.json"]
NextJS examples/cms-sanity > npm run studio:dev error
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Home Binaries: Node: 18.16.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.1 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which example does this report relate to? cms-sanity ### What browser are you using? (if relevant) Chrome Version 112.0.5615.138 ### How are you deploying your application? (if relevant) _No response_ ### Describe the Bug Visiting https://github.com/vercel/next.js/tree/canary/examples/cms-sanity I've clicked Deploy under Step 1. I've created the github repo, created a sanitycms project, connected them both to Vercel, cloned the github repo locally, then followed instructions in the local README; run `npx vercel link` fine, run `npx vercel env pull` fine, run `yarn install && yarn dev` fine. In a new terminal tab, when I run `npm run studio:dev` I receive an error: ``` > prestart > npm run env > env > cp ../.env .env.development || cp ../.env.local .env.development 'cp' is not recognized as an internal or external command, operable program or batch file. 'cp' is not recognized as an internal or external command, operable program or batch file. ``` ### Expected Behavior To start the Sanity Studio at https://localhost:3333 through `npm run studio:dev` without an error. ### To Reproduce Clone the repo, follow steps 1 to 4. At Step 4, check the error.
https://github.com/vercel/next.js/issues/48712
https://github.com/vercel/next.js/pull/48740
aaf7fa5d257ed7d9e9201f324cd247f0b8ae82f8
f9f0f335e649ac14b0ec10b1ebeeafd36bedaccc
"2023-04-22T11:46:57Z"
javascript
"2023-05-21T21:23:49Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,704
["packages/next/src/build/webpack-config.ts", "packages/next/src/compiled/@vercel/og/index.node.js", "packages/next/src/server/web/spec-extension/image-response.ts", "test/e2e/app-dir/metadata-dynamic-routes/index.test.ts"]
[NEXT-1047] OpenGraph does not work in AppDir dynamic routes
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 18.14.0 npm: 9.3.1 Yarn: 1.22.19 pnpm: 7.27.0 Relevant packages: next: 13.3.1 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://github.com/khuezy/nextog ### To Reproduce 1. `npm install` 2. `npm run dev` 3. go to [localhost:3000/api/og?title=hi](localhost:3000/api/og?title=hi) 4. Note that the OG works locally 5. Deploy to vercel 6. Go to the deployed site and append `"/api/og?title=hi"` 7. See white page 8. Go into Vercel dashboard and view logs 9. Error: no such file or directory, open `'/vercel/path0/node_modules/next/dist/compiled/@vercel/og/noto-sans-v27-latin-regular.ttf'` ### Describe the Bug When using `ImageResponse` in a dynamic open graph endpoint, the request fails b/c of a missing font file that it tries to load. NOTE: if you remove the "request" reference to grab the title (hence making the route static,) then it works w/o issue b/c it was able to load the font locally. ### Expected Behavior ImageResponse should work in dynamic app dir route. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1047](https://linear.app/vercel/issue/NEXT-1047/opengraph-does-not-work-in-appdir-dynamic-routes)</sub>
https://github.com/vercel/next.js/issues/48704
https://github.com/vercel/next.js/pull/48844
219d1d49c7654cc21635263191031fc9c6d71560
98e0c4a51cfe6573ae35481d8bd83ed451f0e41f
"2023-04-22T03:21:47Z"
javascript
"2023-04-26T23:36:42Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,689
["packages/next/src/build/webpack/loaders/next-metadata-route-loader.ts", "packages/next/src/lib/metadata/get-metadata-route.ts", "packages/next/src/lib/metadata/is-metadata-route.ts", "test/e2e/app-dir/metadata-dynamic-routes/app/metadata-base/unset/opengraph-image2.tsx", "test/e2e/app-dir/metadata-dynamic-routes/index.test.ts"]
404 for dynamic icon metadata with number suffix
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 19.6.0 npm: 9.4.0 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.3.1-canary.18 eslint-config-next: 13.2.1 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js) ### Link to the code that reproduces this issue https://stackblitz.com/edit/vercel-next-js-im8ec9?file=app/page.tsx ### To Reproduce Create an dynamic icon metadata file with a number suffix like `icon2.tsx` ### Describe the Bug The icon path returns 404 ### Expected Behavior The icon should be returned ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/48689
https://github.com/vercel/next.js/pull/48928
c94122dc2c417d5be11b0bfa50c0957e0e2ae91a
44dc4efad21f3d85d7385f85a726efc45e494fd3
"2023-04-21T20:36:18Z"
javascript
"2023-04-28T10:27:21Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,653
["packages/next/src/lib/typescript/writeConfigurationDefaults.ts"]
next-types-plugin does not work on Turborepo monorepos
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information I have also tested latest canary and worked with Anthony Shew to confirm the issue exists on all of Turbo's templates ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:58 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6020 Binaries: Node: 18.13.0 npm: 8.19.3 Yarn: N/A pnpm: 8.1.1 Relevant packages: next: 13.3.0 eslint-config-next: 13.0.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) TypeScript (plugin, built-in types) ### Link to the code that reproduces this issue npx create-turbo@latest ### To Reproduce 1. `npx create-turbo@latest` 2. Use `pnpm` 3. Try to use the workspace version of TS 4. Plugin doesn't work ### Describe the Bug The plugin doesn't work ### Expected Behavior The plugin works
https://github.com/vercel/next.js/issues/48653
https://github.com/vercel/next.js/pull/48668
abbf35264332010bc7bd2308bb684dfb085fac3a
8fd9a39152178d8232ed372ab80e2724683f6aaa
"2023-04-20T23:32:03Z"
javascript
"2023-04-21T15:51:27Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,603
["packages/next/src/lib/metadata/get-metadata-route.ts"]
Next fails to build on Windows with a favicon.ico in the app/ folder (HookWebpackError: File C:\Users\xxx\Projects\next-favicon-reproduction\.next\server\app\favicon.ico\route.js does not exist.)
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 18.16.0 npm: N/A Yarn: N/A pnpm: 8.3.1 Relevant packages: next: 13.3.1-canary.16 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js), Operating System (Windows, MacOS, Linux) ### Link to the code that reproduces this issue https://github.com/r3Fuze/next-favicon-reproduction ### To Reproduce - Use Windows - Add a `favicon.ico` to the `app/` folder. (I used one from create-next-app) - Run `pnpm build` - Build fails ### Describe the Bug This happens on Windows, but not when I tried to reproduce it on codesandbox.io. It became a problem starting with `13.3.1-canary.6` and is still broken in `13.3.1-canary.16` Builds without problems on `13.3.1-canary.5` Full error: ``` warn - You have enabled experimental feature (appDir) in next.config.js. warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk. info - Thank you for testing `appDir` please leave your feedback at https://nextjs.link/app-feedback Failed to compile. HookWebpackError: File C:\Users\xxx\Projects\next-favicon-reproduction\.next\server\app\favicon.ico\route.js does not exist. at makeWebpackError (C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\compiled\webpack\bundle5.js:28:308185) at C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\compiled\webpack\bundle5.js:28:105236 at eval (eval at create (C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\compiled\webpack\bundle5.js:13:28771), <anonymous>:57:1) at C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\compiled\webpack\bundle5.js:28:68649 at C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\webpack\plugins\next-trace-entrypoints-plugin.js:420:143 -- inner error -- Error: File C:\Users\xxx\Projects\next-favicon-reproduction\.next\server\app\favicon.ico\route.js does not exist. at Job.emitDependency (C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\compiled\@vercel\nft\index.js:1:39473) at async Promise.all (index 3) at async nodeFileTrace (C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\compiled\@vercel\nft\index.js:1:35430) at async C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\webpack\plugins\next-trace-entrypoints-plugin.js:141:28 at async Span.traceAsyncFn (C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\trace\trace.js:97:20) at async TraceEntryPointsPlugin.createTraceAssets (C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\webpack\plugins\next-trace-entrypoints-plugin.js:95:9) caused by plugins in Compilation.hooks.processAssets Error: File C:\Users\xxx\Projects\next-favicon-reproduction\.next\server\app\favicon.ico\route.js does not exist. at Job.emitDependency (C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\compiled\@vercel\nft\index.js:1:39473) at async Promise.all (index 3) at async nodeFileTrace (C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\compiled\@vercel\nft\index.js:1:35430) at async C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\webpack\plugins\next-trace-entrypoints-plugin.js:141:28 at async Span.traceAsyncFn (C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\trace\trace.js:97:20) at async TraceEntryPointsPlugin.createTraceAssets (C:\Users\xxx\Projects\next-favicon-reproduction\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\webpack\plugins\next-trace-entrypoints-plugin.js:95:9) > Build failed because of webpack errors info - Creating an optimized production build . ELIFECYCLE  Command failed with exit code 1.``` ### Expected Behavior Next builds without errors ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/48603
https://github.com/vercel/next.js/pull/48779
5b609e264f56e6e7c6e230d88ad444650b5b6ba9
7fb4d27053e0426cf64d5acd682b97ef7984e5c5
"2023-04-19T22:57:20Z"
javascript
"2023-04-24T19:12:25Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,593
["packages/next/src/build/webpack-config.ts"]
Build time error: Can't resolve @swc/helpers/...
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash > ./node_modules/.bin/next info Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 18.15.0 npm: 9.6.4 Yarn: N/A pnpm: 8.2.0 Relevant packages: next: 13.3.1-canary.16 eslint-config-next: 13.3.1-canary.16 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://github.com/jianliao/nextjs-rsp-bug ### To Reproduce 1. Git clone https://github.com/jianliao/nextjs-rsp-bug 2. npm i 3. npm run build The issue is exactly same as #38192. ### Describe the Bug After upgrade to `[email protected]`, next build will fail with below error messages: ``` > [email protected] build > next build warn - You have enabled experimental feature (appDir) in next.config.js. warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk. info - Thank you for testing `appDir` please leave your feedback at https://nextjs.link/app-feedback Failed to compile. ./node_modules/@internationalized/date/dist/import.mjs Module not found: Can't resolve '@swc/helpers/src/_class_private_field_init.mjs' https://nextjs.org/docs/messages/module-not-found Import trace for requested module: ./node_modules/@react-spectrum/calendar/dist/import.mjs ./node_modules/@adobe/react-spectrum/dist/import.mjs ./app/page.tsx ./node_modules/@internationalized/date/dist/import.mjs Module not found: Can't resolve '@swc/helpers/src/_define_property.mjs' https://nextjs.org/docs/messages/module-not-found Import trace for requested module: ./node_modules/@react-spectrum/calendar/dist/import.mjs ./node_modules/@adobe/react-spectrum/dist/import.mjs ./app/page.tsx ./node_modules/@react-aria/focus/dist/import.mjs Module not found: Can't resolve '@swc/helpers/src/_define_property.mjs' https://nextjs.org/docs/messages/module-not-found Import trace for requested module: ./node_modules/@react-spectrum/actiongroup/dist/import.mjs ./node_modules/@adobe/react-spectrum/dist/import.mjs ./app/page.tsx ./node_modules/@react-stately/collections/dist/import.mjs Module not found: Can't resolve '@swc/helpers/src/_define_property.mjs' https://nextjs.org/docs/messages/module-not-found Import trace for requested module: ./node_modules/@adobe/react-spectrum/dist/import.mjs ./app/page.tsx ./node_modules/@react-stately/grid/dist/import.mjs Module not found: Can't resolve '@swc/helpers/src/_define_property.mjs' https://nextjs.org/docs/messages/module-not-found Import trace for requested module: ./node_modules/@react-stately/table/dist/import.mjs ./node_modules/@react-spectrum/table/dist/import.mjs ./node_modules/@adobe/react-spectrum/dist/import.mjs ./app/page.tsx > Build failed because of webpack errors info - Creating an optimized production build .% ``` ### Expected Behavior Build success. ### Which browser are you using? (if relevant) Chrome 113.0.5672.35 ### How are you deploying your application? (if relevant) next build
https://github.com/vercel/next.js/issues/48593
https://github.com/vercel/next.js/pull/48980
514d57aefa6e0c223eda80f1455eee01c7e4f629
03189bb2ac5c9bc62fcf9bf80c579e870e23f64f
"2023-04-19T20:26:31Z"
javascript
"2023-04-29T12:06:08Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,471
["packages/next/src/client/components/layout-router.tsx", "packages/next/src/client/components/router-reducer/create-router-cache-key.ts", "test/e2e/app-dir/search-params-react-key/app/client-component.js", "test/e2e/app-dir/search-params-react-key/app/layout.tsx", "test/e2e/app-dir/search-params-react-key/app/page.tsx", "test/e2e/app-dir/search-params-react-key/layout-params.test.ts", "test/e2e/app-dir/search-params-react-key/next.config.js"]
Shallow routing on Next.js 13
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 Binaries: Node: 18.12.0 npm: 8.19.2 Yarn: 3.1.1 pnpm: N/A Relevant packages: next: 13.3.0 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/nextjs-appdir-forked-idgl66 ### To Reproduce Using what's documented in here - https://beta.nextjs.org/docs/api-reference/use-search-params#updating-searchparams - causes ### Describe the Bug Currently in Next.js 13 when adding / removing the search params, I always get a hard-reload. In Next.js 12, one could do something like `router.push('/?counter=10', undefined, { shallow: true })` and not trigger a hard reload. However in the current version the following code always causes a hard-reload and all the components re-mount even though it's the same page. ``` import { useRouter, usePathname } from 'next/navigation'; function Component() { const router = useRouter(); const pathname = usePathname(); useEffect(() => { router.replace(!selectedItem ? pathname : `${pathname}?item=${selectedItem.slug}`); }, [dependencies]); } ``` How can one achieve the Next.js 12 shallow routing in the current version? Decided to convert this into an issue after having an unanswered https://github.com/vercel/next.js/discussions/48110 with some people reporting the exact same issue. ### Expected Behavior In the reproduction case I'd expect clicking on the button would not re-mount the component entirely and a shallow navigation would happen. ### Which browser are you using? (if relevant) Chrome 112.0.5615.49 ### How are you deploying your application? (if relevant) Vercel
https://github.com/vercel/next.js/issues/48471
https://github.com/vercel/next.js/pull/49047
905cb5a56b06bf59f7d8a5957e249e03bb0d779b
25ba8a74b7544dfb6b30d1b67c47b9cb5360cb4e
"2023-04-17T09:24:51Z"
javascript
"2023-05-01T18:57:45Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,442
["packages/next/src/shared/lib/lazy-dynamic/no-ssr-error.ts", "test/e2e/app-dir/deopted-into-client-rendering-warning/app/layout.tsx", "test/e2e/app-dir/deopted-into-client-rendering-warning/app/page.tsx", "test/e2e/app-dir/deopted-into-client-rendering-warning/deopted-into-client-rendering-warning.test.ts", "test/e2e/app-dir/deopted-into-client-rendering-warning/next.config.js"]
[NEXT-1125] Misleading deopted-into-client-rendering warning on build
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 Binaries: Node: 19.5.0 npm: 9.3.1 Yarn: 1.22.19 pnpm: 8.2.0 Relevant packages: next: 13.3.1-canary.8 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://stackblitz.com/edit/vercel-next-js-f51au5 (you may have to download locally; I couldn't get next build to run in stackblitz) ### To Reproduce If the root page or layout calls headers() or cookies() outside of any Suspense boundary, then `next build` outputs this warning for each affected page: ``` warn - Entire page / deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering / ``` If it's the root layout that uses that dynamic data, it prints this for every single route. While it's true that the page can't be statically generated, it's not true that it all deopted into client-side rendering. The page does SSR just fine. ### Describe the Bug Error message is misleading. ### Expected Behavior The error should not appear, or should have different text. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1125](https://linear.app/vercel/issue/NEXT-1125/misleading-deopted-into-client-rendering-warning-on-build)</sub>
https://github.com/vercel/next.js/issues/48442
https://github.com/vercel/next.js/pull/50219
0718dbb7a549853c1a9eef78b008490d16020a43
eba9e39ea487f281dc6cfc1ee2de09e2c4b23d61
"2023-04-16T04:41:07Z"
javascript
"2023-05-23T15:37:57Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,438
["packages/next/src/client/components/app-router.tsx", "test/e2e/app-dir/navigation/app/external-push/[storageKey]/page.js", "test/e2e/app-dir/navigation/app/redirect/external-log/[storageKey]/page.js", "test/e2e/app-dir/navigation/navigation.test.ts"]
App Router: External redirect causes hundreds of canceled network requests, only works because of React's infinite loop failsafe
- [X] I verified that the issue exists in the latest Next.js canary release <details> <summary>Environment information</summary> On StackBlitz: ```bash ❯ next info Operating System: Platform: linux Arch: x64 Version: Ubuntu 20.04.0 LTS Sat Apr 15 2023 16:22:47 GMT-0700 (Pacific Daylight Time) Binaries: Node: 16.14.2 npm: 7.17.0 Yarn: 1.22.19 pnpm: 8.2.0 Relevant packages: next: 13.3.1-canary.8 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` </details> ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Routing (next/router, next/navigation, next/link) ### Link to the code that reproduces this issue https://stackblitz.com/edit/vercel-next-js-xw3kie?file=app%2Ftest%2Fpage.tsx ### To Reproduce Call `redirect()` with an external URL from a server component, such that client JS handles the redirect. (Not sure on the exact conditions that trigger this but I got it to work in the repro with one level of route nesting and a 300ms sleep.) You can repro it on the linked StackBlitz by opening /test in a new browser tab (eg: for me it was `https://vercelnextjsxw3kie-1hzg--3000--c8358679.local-credentialless.webcontainer.io/test`). Before navigating to that URL, you'll probably want devtools Console and Network open with "Preserve log" enabled in both to see the issue. ### Describe the Bug It does do the redirect successfully, but: Note in the Network tab that there are literally hundreds of requests to the destination which all get canceled, until one finally goes through: <img width="1050" alt="image" src="https://user-images.githubusercontent.com/6820/232257956-aa23b23c-ef7a-4892-8356-ded3be741519.png"> <img width="1017" alt="image" src="https://user-images.githubusercontent.com/6820/232257964-b2567cbd-286b-4815-b2fb-a4b419acea78.png"> In the Console tab, you'll see errors from React about infinite loop, plus one from Chrome about it throttling navigations: <img width="1321" alt="image" src="https://user-images.githubusercontent.com/6820/232257938-2767171d-9c96-48b1-abf3-704cbd0fc719.png"> This is bad for performance (in my testing, costs about 1 second!) and also confusing as a developer. ### Expected Behavior I expect the redirect to happen without all of these extra requests. I traced the root cause to how HandleRedirect in redirect-boundary.tsx is implemented to handle the redirect error object. It calls router.replace() and then resets its parent RedirectErrorBoundary once that route transition finishes: https://github.com/vercel/next.js/blob/20c5a23a90ec0fe1ae81cd0bc6b21712584bb471/packages/next/src/client/components/redirect-boundary.tsx#L23-L26 For internal navigations, this works fine (?) since the router.replace() state update does not finish until the navigation is complete, so the reset() does not get called until then. For external navigations, router.replace() succeeds immediately, calling location.replace in a useEffect (based on pushRef.mpaNavigation being set). But that location.replace doesn't prevent further in-page JS from running, so reset() is called, so it again tries to render the original content which redirects, which once again triggers getDerivedStateFromError. Ad infinitum. ### Which browser are you using? (if relevant) I've been testing using Chrome
https://github.com/vercel/next.js/issues/48438
https://github.com/vercel/next.js/pull/49058
931c10129913a847cf6c4ba5f561b2ebf5b8edcc
05cd5157e5c055b34cab8f5278e1ab7427678f99
"2023-04-15T23:34:22Z"
javascript
"2023-05-03T09:04:53Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,431
["packages/next/src/build/webpack/loaders/next-app-loader.ts", "test/e2e/app-dir/parallel-routes-not-found/next.config.js"]
[NEXT-1021] parallel-route-default not resolved if .js is not in the page extensions
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 16.18.0 npm: 8.19.2 Yarn: 3.5.0 pnpm: 8.1.0 Relevant packages: next: 13.3.1-canary.8 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://github.com/juliusmarminge/intercepting-routes-repro ### To Reproduce 1. Clone repo 2. Start dev - you'll get this error: <details> <summary>Error log</summary> ``` error - uncaughtException: Error: . is neither a posix nor a windows path, and there is no 'join' method defined in the file system at join (/Users/julius/Dev/sandbox/next-intercept/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/webpack/bundle5.js:28:1346037) at /Users/julius/Dev/sandbox/next-intercept/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/webpack/bundle5.js:28:289998 at arrayEachIndex (/Users/julius/Dev/sandbox/next-intercept/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/neo-async/async.js:1:7165) at Object.map (/Users/julius/Dev/sandbox/next-intercept/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/neo-async/async.js:1:9971) at Array.<anonymous> (/Users/julius/Dev/sandbox/next-intercept/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/webpack/bundle5.js:28:289973) at runCallbacks (/Users/julius/Dev/sandbox/next-intercept/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/webpack/bundle5.js:1:152096) at /Users/julius/Dev/sandbox/next-intercept/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/webpack/bundle5.js:1:154008 at /Users/julius/Dev/sandbox/next-intercept/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/webpack/bundle5.js:1:253738 at FSReqCallback.oncomplete (node:fs:192:23) ``` </details> 3. Add a `default.tsx` with a default null export: `export default () => null; ` in root and the parallel modal route: ![CleanShot 2023-04-15 at 22 55 40](https://user-images.githubusercontent.com/51714798/232252783-8dfbee20-6ac6-4aa4-b69f-4e8f294c51f8.png) 4. Restart dev - error gone. ### Describe the Bug Intercepting + Parallel route modals require a `default.tsx` file or else the app crashes (or atleast freezes), see demo below. https://user-images.githubusercontent.com/51714798/232252868-fefe124e-144a-4402-b5b5-fa00edd8ba5a.mp4 ### Expected Behavior App should work without the `default.tsx`. As stated in docs, it should only be required as a fallback after hard-refreshes: https://beta.nextjs.org/docs/routing/parallel-routes#defaultjs And @timneutkens mentioned there should be a default provided by next: https://twitter.com/timneutkens/status/1647282559573794817?s=20 So the app should run fine without these "null-barrel-exports". Weirdly enough, [vercel-labs/nextgram](https://github.com/vercel-labs/nextgram) runs fine even after deleting these 2 default files... ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1021](https://linear.app/vercel/issue/NEXT-1021/bugnext-intercepting-routes-not-working-without-defaulttsx)</sub>
https://github.com/vercel/next.js/issues/48431
https://github.com/vercel/next.js/pull/48446
2eb821ad19f79eade53b260eedb4ef386965d5f9
07410160230d31ac8eec6945d2486120a19b4048
"2023-04-15T21:02:48Z"
javascript
"2023-04-17T08:06:50Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,406
["packages/next/src/lib/generate-interception-routes-rewrites.ts", "packages/next/src/shared/lib/router/utils/prepare-destination.ts", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"]
[NEXT-1017] Intercepted routes: error on Vercel builds only
### Verify canary release * [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ``` Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 Binaries: Node: 18.15.0 npm: 9.5.0 Yarn: N/A pnpm: 8.1.0 Relevant packages: next: 13.3.1-canary.7 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue [https://intercepted-modals.vercel.app](https://intercepted-modals.vercel.app) ### To Reproduce Clone and deploy the following project to Vercel: [https://github.com/alex-ketch/intercepted-modals](https://github.com/alex-ketch/intercepted-modals). An existing deployment can be seen here: [https://intercepted-modals.vercel.app](https://intercepted-modals.vercel.app) ## 404 Error: * Open [https://intercepted-modals.vercel.app](https://intercepted-modals.vercel.app) * Click "intercepting-parallel-modal" link * Click on any of the links listed under "Feed for userId" * See 404 error * Refresh the page. Content of photo detail page is present. ## 500 Error: * Open [https://intercepted-modals.vercel.app](https://intercepted-modals.vercel.app) * Click "dynamic-sibling-route" link * Click on any of the links listed under "Feed for userId" * See 500 error * Refresh the page. 500 error is still present. ### Describe the Bug When a project using intercepted routes is deployed to Vercel, a runtime error is encountered when attempting to open the intercepted route. What makes it hard to debug is that this error is not present during local development builds, or `vercel dev` commands. There are two similar scenarios which both cause errors: * 404 error for an intercepted route for a different path segment (e.g. from `/intercepting-parallel-modal/userId` intercepting `intercepting-parallel-modal/photo/1`) * 500 error for intercepted route for a the current path segment (e.g. from `dynamic-sibling-route` intercepting `/dynamic-sibling-route/3`) The above linked reproduction repo is directly based on the e2e tests found here: [https://github.com/vercel/next.js/tree/canary/test/e2e/app-dir/parallel-routes-and-interception/app/(group)](https://github.com/vercel/next.js/tree/canary/test/e2e/app-dir/parallel-routes-and-interception/app/(group)). I've added another use case of catching a dynamic path for the current path under the `dynamic-sibling-route` folder. When attempting to visit the modal route a 404 error is shown, but no relevant logs are seen in Vercel. When attempting to visit a route for a dynamic sibling route the following 500 error is logged. ``` Error: Cannot find module '/var/task/.next/server/app/(group)/dynamic-sibling-route/@modal/(.)/[id]/page.js' Require stack: - /var/task/node_modules/next/dist/server/require.js - /var/task/node_modules/next/dist/server/next-server.js - /var/task/___next_launcher.cjs at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15) at mod._resolveFilename (/var/task/node_modules/next/dist/build/webpack/require-hook.js:23:32) at Module._load (node:internal/modules/cjs/loader:885:27) at Module.require (node:internal/modules/cjs/loader:1105:19) at require (node:internal/modules/cjs/helpers:103:18) at Object.requirePage (/var/task/node_modules/next/dist/server/require.js:134:12) at /var/task/node_modules/next/dist/server/load-components.js:51:73 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.loadComponentsImpl [as loadComponents] (/var/task/node_modules/next/dist/server/load-components.js:51:26) at async NextNodeServer.findPageComponentsImpl (/var/task/node_modules/next/dist/server/next-server.js:667:36) { code: 'MODULE_NOT_FOUND', requireStack: [ '/var/task/node_modules/next/dist/server/require.js', '/var/task/node_modules/next/dist/server/next-server.js', '/var/task/___next_launcher.cjs' ], page: '/dynamic-sibling-route/2' } RequestId: fda2079e-9e18-4eda-aae7-fea0407cb78b Error: Runtime exited with error: exit status 1 Runtime.ExitError ``` --- * [CodeSandbox](https://codesandbox.io/p/github/alex-ketch/intercepted-modals/main?file=%2FREADME.md&workspace=%257B%2522activeFilepath%2522%253A%2522%252FREADME.md%2522%252C%2522openFiles%2522%253A%255B%2522%252FREADME.md%2522%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522spaces%2522%253A%257B%2522clgh77bc700153b616e55865c%2522%253A%257B%2522key%2522%253A%2522clgh77bc700153b616e55865c%2522%252C%2522name%2522%253A%2522Default%2522%252C%2522devtools%2522%253A%255B%257B%2522type%2522%253A%2522PREVIEW%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522port%2522%253A41315%252C%2522key%2522%253A%2522clgh77j1o006v3b61t7ee6iee%2522%252C%2522isMinimized%2522%253Afalse%252C%2522path%2522%253A%2522%252Fdynamic-sibling-route%2522%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522key%2522%253A%2522clgh77h9b004a3b61g3uqcvqu%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D%257D%252C%2522currentSpace%2522%253A%2522clgh77bc700153b616e55865c%2522%252C%2522spacesOrder%2522%253A%255B%2522clgh77bc700153b616e55865c%2522%255D%252C%2522hideCodeEditor%2522%253Afalse%257D): error is not present * incidentally the intercepting-parallel-modal example also demonstrates issue with clearing the slot contents as mentioned in #48124 Thought I'd mentioned you @feedthejim since I noticed you were working on these features recently. Let me know if you need any further info in debugging this. ### Expected Behavior Should match behaviour seen in local development builds. I.e. clicking on a link for an item in the feed should show contents of the detail view. ### Which browser are you using? (if relevant) *No response* ### How are you deploying your application? (if relevant) Vercel <sub>From [SyncLinear.com](https://synclinear.com) | [NEXT-1017](https://linear.app/vercel/issue/NEXT-1017/intercepted-routes-error-on-vercel-builds-only)</sub>
https://github.com/vercel/next.js/issues/48406
https://github.com/vercel/next.js/pull/48451
612c8cb2bf3ec475358baa2bed2dc1b34ae9b343
ea8c4274b818be0cebad1fa1b9ebc3202ee5592c
"2023-04-15T00:11:01Z"
javascript
"2023-04-17T08:08:25Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,376
["packages/next/src/server/lib/render-server-standalone.ts", "packages/next/src/server/lib/render-server.ts", "packages/next/src/server/lib/server-ipc/index.ts", "packages/next/src/server/lib/start-server.ts", "packages/next/src/server/lib/worker-utils.ts", "packages/next/src/server/next-server.ts"]
`NODE_OPTIONS` environment variable not working on render server
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Thu Jan 5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000 Binaries: Node: 18.14.0 npm: 9.3.1 Yarn: 1.22.19 pnpm: 8.2.0 Relevant packages: next: 13.3.1-canary.6 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue pnpm create next-app ### To Reproduce Add the follow line into `package.json` > `"script"` ```json "dev:debug": "NODE_OPTIONS='--inspect' next dev", ``` Then run `pnpm dev:debug` ### Describe the Bug ![image](https://user-images.githubusercontent.com/14261588/231964010-cb652ef0-95f8-4cf9-8caa-a66c7badf692.png) The NODE_OPTIONS arguments did not pass to render server, any break point will not working, even `debugger;` also not working. ### Expected Behavior ![image](https://user-images.githubusercontent.com/14261588/231965589-d2695017-1810-46fb-97e4-11177bc38a7e.png) The NODE_OPTIONS arguments should pass down to render server, and the render server debug port should be mounted to 9230. ### Which browser are you using? (if relevant) Chrome 111.0.5563.146 ### How are you deploying your application? (if relevant) Vercel
https://github.com/vercel/next.js/issues/48376
https://github.com/vercel/next.js/pull/48019
ff070e530b239e89ed05ff8bfc0990a351e4c0a1
90331f38ccf49e0632e84688aae05beac9ac64a6
"2023-04-14T06:50:27Z"
javascript
"2023-05-23T18:03:08Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,372
["packages/next/src/server/stream-utils/node-web-streams-helper.ts", "test/e2e/app-dir/app/index.test.ts"]
[NEXT-1200] Misplaced script tags in HTML when using appDir
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 18.13.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.1-canary.6 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://stackblitz.com/edit/vercel-next-js-gq2mmt ### To Reproduce Create any Next.js application using the appDir feature. The reproduction template for the appDir feature will be used for this example. ```shell npx create-next-app -e reproduction-template-app-dir ``` Run the development server or run in production mode, the issue persists regardless. ```shell npm run dev # or npm start ``` Go to the network tab and select the root file. Go to the response tab and view the raw HTML. On Firefox, it looks something like this: ![image](https://user-images.githubusercontent.com/22254748/231933946-95ef994c-d905-457f-8285-ad4459662074.png) Chrome: ![image](https://user-images.githubusercontent.com/22254748/231934040-447ff8db-5b39-4863-a767-664093ea5ab5.png) To see if the issue exists, the website using the appDir feature can also be put through the W3 validator, which will identify whether there are misplaced script tags or not. As an example, use Vercel's App Router website: https://app-dir.vercel.app **Results** https://validator.w3.org/nu/?doc=https%3A%2F%2Fapp-dir.vercel.app ![image](https://user-images.githubusercontent.com/22254748/231937210-0ef9f166-e875-475a-8db7-beee60e9640b.png) ### Describe the Bug When using the appDir feature, misplaced/stray script tags are present, meaning that there are script tags that are placed outside of the closing `</html>` element. An example of this is shown below: ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="stylesheet" href="/_next/static/css/app/page.css" data-precedence="next.js" /> <link rel="stylesheet" href="/_next/static/css/app/layout.css" data-precedence="next.js" /> <title>Create Next App</title> <meta name="description" content="Generated by create next app" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="icon" href="\favicon.ico" type="image/x-icon" sizes="any" /> <script src="/_next/static/chunks/polyfills.js" nomodule=""></script> </head> <body> <!-- Body content --> </body> </html> <script> (self.__next_f = self.__next_f || []).push([0]); </script> <script> self.__next_f.push([1, '0:"$L1"\n']); </script> <script> self.__next_f.push([ 1, '2:I{"id":"(app-client)/./node_modules/next/dist/client/components/app-router.js","name":"","chunks":["app-client-internals:app-client-internals"],"async":false}\n4:I{"id":"(app-client)/./node_modules/next/dist/client/components/error-boundary.js","name":"","chunks":["app-client-internals:app-client-internals"],"async":false}\n6:I{"id":"(app-client)/./node_modules/next/dist/client/components/layout-router.js","name":"","chunks":["app-client-internals:app-client-internals"],"async":false}\n7:I{"id":"(app-client)', ]); </script> <script> self.__next_f.push([ 1, '/./node_modules/next/dist/client/components/render-from-template-context.js","name":"","chunks":["app-client-internals:app-client-internals"],"async":false}\n8:I{"id":"(app-client)/./node_modules/next/dist/client/image.js","name":"","chunks":["app/page:app/page"],"async":false}\n', ]); </script> <!-- Script tags continue --> ``` These script tags are automatically generated by Next.js and do not appear to be scripts that are inserted via the `<Script />` component. I have also confirmed that this issue is not present when using the `pages/` directory, tested on the latest canary release. ### Expected Behavior The HTML should not contain any misplaced script tags (stray start tag `script`). All script tags should be placed inside the `<body>` tag instead. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1200](https://linear.app/vercel/issue/NEXT-1200/misplaced-script-tags-in-html-when-using-appdir)</sub>
https://github.com/vercel/next.js/issues/48372
https://github.com/vercel/next.js/pull/50056
f0d0811a423d9674f9f89a06cfbb74e839f4a9b6
26ea9c63336ad24c0b100c1fc637e97d77a425e0
"2023-04-14T05:07:29Z"
javascript
"2023-05-19T18:25:04Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,342
["packages/next/src/server/base-server.ts", "test/e2e/app-dir/app-static/app-static.test.ts", "test/e2e/app-dir/app-static/app/articles/[slug]/page.tsx"]
Incorrect status code served for not-found pages
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 Binaries: Node: 16.17.0 npm: 8.15.0 Yarn: 1.22.19 pnpm: 7.13.1 Relevant packages: next: 13.3.0 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://stackblitz.com/edit/vercel-next-js-hj5fbc?file=app%2Fnot-found.tsx ### To Reproduce Go to any not-found page Check the status code returned by the server (200) ### Describe the Bug The status code returned by the server should be 404 ### Expected Behavior The status code returned by the server should be 404 ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/48342
https://github.com/vercel/next.js/pull/55542
0338dcdf2cb1e56dbece1042552b5daf057096e8
9697bcd3c8672f7926cc19222e9c5801a9f49c6b
"2023-04-13T13:04:14Z"
javascript
"2023-09-18T19:35:00Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,309
["packages/next/src/client/components/app-router.tsx", "test/e2e/app-dir/navigation/app/external-push/[storageKey]/page.js", "test/e2e/app-dir/navigation/app/redirect/external-log/[storageKey]/page.js", "test/e2e/app-dir/navigation/navigation.test.ts"]
[NEXT-1028] App directory: Next 13.3.x redirect() to page with dynamic data causes fetch to fail in Safari
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023 Binaries: Node: 18.14.2 npm: 9.5.0 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.3.1-canary.5 eslint-config-next: 13.2.4 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/cranky-alex-4xgl9k?selection=%5B%7B%22endColumn%22%3A2%2C%22endLineNumber%22%3A10%2C%22startColumn%22%3A2%2C%22startLineNumber%22%3A10%7D%5D&file=%2Fapp%2Fpage.tsx ### To Reproduce - Using Next 13.3.x - In production mode (`npm run build && npm run start`) - A page has a `redirect('/some/other/page')` - The target page ('/some/other/page') has server side data fetching via `fetch` Using the code sandbox above, start the instance in production mode and go to the root page that has has the redirect in the Safari. See the redirect attempt fail causing a cascade of retries via fetch. ### Describe the Bug IF there is a server-side redirect using `redirect()` and the redirected target page has a `fetch()` with server side dynamic data via `fetch()`, the initial redirect will fail, the RSC will fail to load, and there will an loop of retries. https://user-images.githubusercontent.com/896475/231565516-f1bf0687-b417-4277-bacb-decd39319035.mp4 ### Expected Behavior In Safari in production `redirect()` behaves as intended (sends user to the redirected page), even if the redirected page has dynamic data. ### Which browser are you using? (if relevant) Safari version 16.4 (18615.1.26.11.23) ### How are you deploying your application? (if relevant) Vercel <sub>[NEXT-1028](https://linear.app/vercel/issue/NEXT-1028/app-directory-next-133x-redirect-to-page-with-dynamic-data-causes)</sub>
https://github.com/vercel/next.js/issues/48309
https://github.com/vercel/next.js/pull/49058
931c10129913a847cf6c4ba5f561b2ebf5b8edcc
05cd5157e5c055b34cab8f5278e1ab7427678f99
"2023-04-12T19:46:27Z"
javascript
"2023-05-03T09:04:53Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,263
["test/e2e/edge-pages-support/app/next.config.js", "test/e2e/edge-pages-support/app/pages/[id].js", "test/e2e/edge-pages-support/app/pages/api/[id].js", "test/e2e/edge-pages-support/app/pages/api/hello.js", "test/e2e/edge-pages-support/app/pages/index.js", "test/e2e/edge-pages-support/index.test.ts"]
Dynamic params in edge API routes
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:01:02 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8112 Binaries: Node: 18.12.1 npm: 8.19.2 Yarn: 1.22.19 pnpm: 8.1.1 Relevant packages: next: 13.3.0 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 warn - Latest canary version not detected, detected: "13.3.0", newest: "13.3.1-canary.4". Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue. Read more - https://nextjs.org/docs/messages/opening-an-issue ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://github.com/vitalikda/edge-api-route-dynamic-params ### To Reproduce Create edge api route with dynamic param and try to access it in production ### Describe the Bug When you try to access dynamic params from url, it’s prepend with nextParam string in production, so you can’t access the param ### Example Edge Api route: https://github.com/vitalikda/edge-api-route-dynamic-params/blob/main/src/pages/api/%5Bid%5D/index.ts - in dev mode req.nextUrl.searchParams.get('id') returns ID - in prod: req.nextUrl.searchParams.get('id') returns null Looking at the next url, there is prefix nextParam - `?nextParamid=hello-world` Here is repo: https://github.com/vitalikda/edge-api-route-dynamic-params Here is preview: https://edge-api-route-dynamic-params.vercel.app/ ### Expected Behavior Url search param should be accessible as in nodejs runtime ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) Vercel
https://github.com/vercel/next.js/issues/48263
https://github.com/vercel/next.js/pull/48370
557084a33193acf9f987cf6a215b93643fe5ced7
26a35a479858dd3bd14d5ffd360dab6ef9e3dd95
"2023-04-11T18:48:53Z"
javascript
"2023-04-14T05:07:54Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,262
["packages/next/src/build/index.ts", "packages/next/src/build/utils.ts", "test/e2e/instrumentation-hook/tsconfig.json"]
[NEXT-1035] Instrumentation dependencies are not included in standalone output
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 Binaries: Node: 16.18.1 npm: 8.19.2 Yarn: N/A pnpm: 8.2.0 Relevant packages: next: 13.3.1-canary.4 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://github.com/owenfarrell/nextjs-instrumentation ### To Reproduce * Create a new Next.JS project using `create-next-app` * Install a 3rd party dependency for instrumentation purposes (e.g. `applicationinsights`) * Implement [instrumentation](https://nextjs.org/docs/advanced-features/instrumentation) that references that same 3rd party dependency * Enable the instrumentation hook and standalone output in `nextjs.config.js` * Build the project using `next build` ### Describe the Bug When Next.JS builds a standalone output, the instrumentation source is included a webpack configuration, including nested modules. But the instrumentation source is **_not_** included in output tracing. As a result, starting the server in standalone mode throws an error when executing the instrumentation hook. ``` Listening on port 3000 url: http://61d4620dca5d:3000 Instrumenting nodejs runtime Unable to instrument nodejs runtime Error: Cannot find module 'applicationinsights' Require stack: - /app/.next/server/instrumentation.js - /app/node_modules/next/dist/server/next-server.js - /app/server.js at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15) at mod._resolveFilename (/app/node_modules/next/dist/build/webpack/require-hook.js:23:32) at Module._load (node:internal/modules/cjs/loader:920:27) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at 6691 (/app/.next/server/instrumentation.js:41:54) at __webpack_require__ (/app/.next/server/webpack-runtime.js:25:42) at Module.register (/app/.next/server/instrumentation.js:19:14) at NextNodeServer.prepareImpl (/app/node_modules/next/dist/server/next-server.js:174:85) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'MODULE_NOT_FOUND', requireStack: [ '/app/.next/server/instrumentation.js', '/app/node_modules/next/dist/server/next-server.js', '/app/server.js' ] } ``` ### Expected Behavior All dependencies required by the instrumentation hook are included in the standalone output (e.g. `.next/standalon/node_modules`). ### How are you deploying your application? (if relevant) Docker <sub>[NEXT-1035](https://linear.app/vercel/issue/NEXT-1035/instrumentation-dependencies-are-not-included-in-standalone-output)</sub>
https://github.com/vercel/next.js/issues/48262
https://github.com/vercel/next.js/pull/48615
39498d604c3b25d92a483153fe648a7ee456fbda
8460373c26a5d5e8682f26fcb1399664e2d88cbc
"2023-04-11T18:34:23Z"
javascript
"2023-04-24T13:49:46Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,257
["packages/next/src/lib/metadata/types/metadata-interface.ts"]
[NEXT-989] Metadata site verification types problem
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Home Single Language Binaries: Node: 19.8.1 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.1-canary.4 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue N/A ### To Reproduce Described below ### Describe the Bug ```tsx import { Metadata } from "next"; export const metadata: Metadata = { verification: { google: "123456", }, }; ``` In the above, when I hover over the verification option in my editor it gives me this: ```tsx { verification: { google: "google-site-verification=1234567890", yandex: "1234567890", "me": "1234567890" } } <meta name="google-site-verification" content="1234567890" /> <meta name="yandex-verification" content="1234567890" /> <meta name="me" content="@me" /> ``` In here at `verification: { google: "google-site-verification=1234567890` should be changed to `verification: { google: "1234567890`. P.S.: I am using the `app` directory, in case that is relevant. ### Expected Behavior Described above ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-989](https://linear.app/vercel/issue/NEXT-989/metadata-site-verification-types-problem)</sub>
https://github.com/vercel/next.js/issues/48257
https://github.com/vercel/next.js/pull/48259
958150d15be0bbd6a05fad99fc301461b8864734
c57b687abbe189fc1c0309d99d75a74773361f0d
"2023-04-11T17:09:27Z"
javascript
"2023-04-12T14:30:41Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,227
["test/integration/app-dir-export/app/not-found.js", "test/integration/app-dir-export/test/config.test.ts", "test/integration/app-dir-export/test/utils.ts"]
App directory root `not-found.tsx` not compiled to `404.html` when using static export
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Home Binaries: Node: 18.12.1 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.1-canary.4 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Static HTML Export (output: "export") ### Link to the code that reproduces this issue https://github.com/ky28059/ky28059.github.io ### To Reproduce Run `next build`, then navigate to the 404 page. ### Describe the Bug Wasn't sure if this qualified as a bug report or feature request, but when running `next build` with a global app-directory 404 page (root `not-found.tsx` page), the generated `404.html` in `/out` is Next's default 404 page and not the `not-found` page. <img width="658" alt="image" src="https://user-images.githubusercontent.com/60120929/231052811-51fc29c7-9362-476a-be85-720d4eed4267.png"> ### Expected Behavior Because `/app/not-found.tsx` handles unmatched URLs like `/pages/404.tsx` formerly did, it makes sense for its HTML contents to be compiled to the static export's `404.html` instead of being ignored in the build output. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1392](https://linear.app/vercel/issue/NEXT-1392/app-directory-root-not-foundtsx-not-compiled-to-404html-when-using)</sub>
https://github.com/vercel/next.js/issues/48227
https://github.com/vercel/next.js/pull/52526
673107551c3466da6d68660b37198eee0a2c85f7
5fff528e154f0a85238ba66220738674d086d869
"2023-04-11T04:02:17Z"
javascript
"2023-07-11T07:32:08Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,207
["packages/next/src/cli/next-export.ts", "packages/next/src/export/index.ts", "test/integration/app-dir-export/test/config.test.ts"]
[NEXT-980] `next export -o <dir>` output directory ignored if next.config has `output: "export"`
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 Binaries: Node: 18.15.0 npm: 9.3.1 Yarn: 1.22.19 pnpm: 8.2.0 Relevant packages: next: 13.3.1-canary.4 eslint-config-next: 13.2.4 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) Static HTML Export (output: "export") ### Link to the code that reproduces this issue https://github.com/jldec/next-reproduction-app ### To Reproduce - clone [repro](https://github.com/jldec/next-reproduction-app) and install deps (I use pnpm) ``` pnpm build ``` - terminal output says ``` warn - "next export" is no longer needed when "output: export" is configured in next.config.js https://nextjs.org/docs/advanced-features/static-html-export Export successful. Files written to /Users/jldec/next/reproduction-app/dist ``` ``` $ ls dist ls: dist: No such file or directory $ ls out 404.html _next favicon.ico index.html ``` ### Describe the Bug Since v13.3.0 `next build` also does export (see https://github.com/vercel/next.js/pull/47376) Any existing builds which use `next export -o <output-dir>` will be broken because `next build` will put the files in the default `out` directory and the subsequent `next export -o <output-dir>` will not re-build or move the files into `<output-dir>`. ### Expected Behavior Prior-version `next export -o` behavior should not be impacted by the new `next build` all-in-one behavior, even if it means re-copying the files to the specified output directory. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-980](https://linear.app/vercel/issue/NEXT-980/next-export-o-dir-output-directory-ignored-if-nextconfig-has-output)</sub>
https://github.com/vercel/next.js/issues/48207
https://github.com/vercel/next.js/pull/51191
de83bf559801a3e250220bf8265bb850c373ee41
a6a9d65c8c002db3c5ad62f1af8dcf545769013b
"2023-04-10T18:33:40Z"
javascript
"2023-06-12T20:15:58Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,204
["packages/next/src/server/app-render/action-handler.ts"]
Error Invariant: missing action ID
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: win32 Arch: x64 Version: Windows 10 Enterprise Binaries: Node: 18.15.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.1-canary.3 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Middleware / Edge (API routes, runtime) ### Link to the code that reproduces this issue https://github.com/UAHector/nextjs-bug-report.git ### To Reproduce Run and navigate to the main page. Complete and submit the form. ### Describe the Bug _After upgrading to next 13.3 I get the following error when redirecting from the new route handlers api using NextResponse.redirect_: **Invariant: missing action ID** <img width="719" alt="image" src="https://user-images.githubusercontent.com/74779764/230958683-c883623b-f13d-40fc-b9b7-6c70905c9850.png"> ========================================== error - Error: Invariant: missing action ID. at Object.handleAction (C:\Users\Documents\GitHub\nextjs-bug-report\node_modules\next\dist\server\app-render\action-handler.js:60:35) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async wrappedRender (C:\Users\Documents\GitHub\nextjs-bug-report\node_modules\next\dist\server\app-render\app-render.js:966:37) at async doRender (C:\Users\Documents\GitHub\nextjs-bug-report\node_modules\next\dist\server\base-server.js:936:34) at async cacheEntry1.responseCache.get.incrementalCache.incrementalCache (C:\Users\Documents\GitHub\nextjs-bug-report\node_modules\next\dist\server\base-server.js:1059:28) at async C:\Users\Documents\GitHub\nextjs-bug-report\node_modules\next\dist\server\response-cache\index.js:83:36 { digest: undefined } ### Expected Behavior It is expected to be able to redirect to another page from the api <img width="340" alt="image" src="https://user-images.githubusercontent.com/74779764/230960061-2479b532-c8d8-4afe-bba6-f000c705948b.png"> ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/48204
https://github.com/vercel/next.js/pull/49119
194da0b3e3cfaa0ebdcd708918b004486a6b7f3b
0bc1b7ec1cd04ee4acf3fc27c874b8afe2a84086
"2023-04-10T17:49:11Z"
javascript
"2023-05-03T04:43:47Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,173
["packages/next/src/server/image-optimizer.ts"]
Error: Cannot find module 'next/dist/compiled/jest-worker' - On Docker
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Error: Cannot find module 'next/dist/compiled/jest-worker' Require stack: - /app/node_modules/next/dist/server/lib/squoosh/main.js - /app/node_modules/next/dist/server/image-optimizer.js - /app/node_modules/next/dist/server/next-server.js - /app/server.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15) at Function.mod._resolveFilename (/app/node_modules/next/dist/build/webpack/require-hook.js:23:32) at Function.Module._load (node:internal/modules/cjs/loader:871:27) at Module.require (node:internal/modules/cjs/loader:1098:19) at require (node:internal/modules/cjs/helpers:108:18) at Object.<anonymous> (/app/node_modules/next/dist/server/lib/squoosh/main.js:8:19) at Module._compile (node:internal/modules/cjs/loader:1196:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10) at Module.load (node:internal/modules/cjs/loader:1074:32) at Function.Module._load (node:internal/modules/cjs/loader:909:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/app/node_modules/next/dist/server/lib/squoosh/main.js', '/app/node_modules/next/dist/server/image-optimizer.js', '/app/node_modules/next/dist/server/next-server.js', '/app/server.js' ] } ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Middleware / Edge (API routes, runtime) ### Link to the code that reproduces this issue https://github.com/Storxy/storxy-business-erp ### To Reproduce Trying to dockerize next application using with docker and the docker file can be found on the repo but it throws an errors when ever I run the containers and visit any page that contain an optimized image while sharp is already been installed and the image not shown ### Describe the Bug images not working in docker apps ### Expected Behavior to show optimized image? ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/48173
https://github.com/vercel/next.js/pull/48513
77204c9ee202c660ac12c0bd4bfa2ae08ecaac7b
12472b4c60069771faf5eebf37013dfcee1bce5d
"2023-04-09T22:03:05Z"
javascript
"2023-04-18T11:34:21Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,143
["packages/next/src/server/app-render/get-segment-param.tsx", "packages/next/src/shared/lib/router/utils/route-regex.test.ts", "packages/next/src/shared/lib/router/utils/route-regex.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-routes-dynamic/photos/(.)[author]/[id]/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-routes-dynamic/photos/[author]/[id]/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-routes-dynamic/photos/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"]
[NEXT-1013] (...)[dynamic] does not work
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash $ next info Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 Binaries: Node: 18.12.1 npm: 8.19.2 Yarn: 1.22.19 pnpm: 8.1.1 Relevant packages: next: 13.3.1-canary.3 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://github.com/sandervspl/intercept-route-test/ ### To Reproduce 1. Go to https://intercept-route-test.vercel.app/en/foo/bar/baz 2. Click on `Show user` 3. It will show the regular page which says `I am a REGULAR user page` ### Describe the Bug You can not use a dynamic parameter with parallel routes, e.g. `(...)[locale]` ### Expected Behavior It should show a page with the text `User INTERCEPT page` ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1013](https://linear.app/vercel/issue/NEXT-1013/[dynamic]-does-not-work)</sub>
https://github.com/vercel/next.js/issues/48143
https://github.com/vercel/next.js/pull/51526
c6313606c9c80e5b2534e18e92942ecb0ade34b4
6f61fb40682ef3a5b7882ddbcb3cb93f3dc58b88
"2023-04-08T20:28:16Z"
javascript
"2023-06-22T09:43:24Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,133
["packages/next/src/server/app-render/get-css-inlined-link-tags.tsx", "test/e2e/app-dir/app-css/app/not-found.js", "test/e2e/app-dir/app-css/app/not-found.module.css", "test/e2e/app-dir/app-css/index.test.ts"]
CSS modules not working in `/app/not-found.tsx`
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023 Binaries: Node: 16.17.0 npm: 8.15.0 Yarn: 1.22.19 pnpm: 7.1.0 Relevant packages: next: 13.3.0 eslint-config-next: 13.2.4 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) ### Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/dark-microservice-lxq1q8?file=%2Fapp%2Fnot-found.tsx ### To Reproduce Click to `Go to 404` page. ### Describe the Bug CSS modules do not apply in `not-found.tsx` ### Expected Behavior CSS modules just work ### Which browser are you using? (if relevant) Chrome ### How are you deploying your application? (if relevant) next dev
https://github.com/vercel/next.js/issues/48133
https://github.com/vercel/next.js/pull/49155
d62755a533920a95693edb4056fd24b8f299fd5e
1e75beada24b35e312b028fa3d1797b4c2c028b2
"2023-04-08T12:25:21Z"
javascript
"2023-05-03T16:45:12Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,122
["packages/next/src/client/components/router-reducer/create-optimistic-tree.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-prefetch-false/@parallel/default.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-prefetch-false/@parallel/foo/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-prefetch-false/default.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-prefetch-false/layout.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-prefetch-false/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"]
[NEXT-1020] Parallel Route Navigation fails with prefetch set to false
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64 Binaries: Node: 16.17.0 npm: 9.1.3 Yarn: 1.22.18 pnpm: N/A Relevant packages: next: 13.3.1-canary.3 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://github.com/dalalmj/prtest ### To Reproduce Using parallel route to display list detail view. List = base route. Detail = @detail, parallel route. This allows user to see list while getting details either in modal or below or to right of list. Parallel route feature works when Link does not have any prefetch. But if you set prefetch to false then whole thing fails (even for link that does not have prefetch) 1. Run, click `List` link. 2. Click on `Works when prefetch=true (default)`, see detail below list `Detail Id 2` 3. Back on Browser (or refresh) 4. Click on `Does Not Works with prefetch=false`, no details shown ### Describe the Bug When prefetch is set to false, navigation to parallel route fails. ### Expected Behavior When prefetch is set to false, navigation to parallel route should work! ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1020](https://linear.app/vercel/issue/NEXT-1020/parallel-route-navigation-fails-with-prefetch-set-to-false)</sub>
https://github.com/vercel/next.js/issues/48122
https://github.com/vercel/next.js/pull/48449
ea8c4274b818be0cebad1fa1b9ebc3202ee5592c
9f67638999d87d15a5a9452b852f8ddcbedba2f4
"2023-04-08T05:40:22Z"
javascript
"2023-04-17T08:12:46Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,118
["packages/next/src/build/webpack-config.ts"]
[NEXT-1100] unhandledRejection: Error [TypeError]: trace.getSpan is not a function
### Verify canary release * [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ``` Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 20.6.0: Sun Nov 6 23:17:00 PST 2022; root:xnu-7195.141.46~1/RELEASE_X86_64 Binaries: Node: 18.12.1 npm: 9.3.1 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.3.1-canary.2 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) CLI (create-next-app) ### Link to the code that reproduces this issue [https://github.com/dossy/nextjs-trace-getSpan-is-not-a-function](https://github.com/dossy/nextjs-trace-getSpan-is-not-a-function) ### To Reproduce Provided by [https://github.com/vercel/next.js/issues/48118#issuecomment-1556428577:](https://github.com/vercel/next.js/issues/48118#issuecomment-1556428577:) reproduce with a yarn workspaces monorepo. Check this one out here: [jamesopti/next-tracespan-error-reproduction](https://github.com/jamesopti/next-tracespan-error-reproduction) The packages/server has "@opentelemetry/api": "^0.18.1" The packages/client is a brand new create next app. ### Describe the Bug Trying to access the app results in an `unhandledRejection: Error [TypeError]: trace.getSpan is not a function` error: ``` $ yarn dev yarn run v1.22.19 $ next dev warn - Port 3000 is in use, trying 3001 instead. ready - started server on 0.0.0.0:3001, url: http://localhost:3001 (node:53803) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time (Use `node --trace-warnings ...` to show where the warning was created) event - compiled client and server successfully in 1821 ms (170 modules) wait - compiling / (client and server)... event - compiled client and server successfully in 467 ms (217 modules) error - unhandledRejection: Error [TypeError]: trace.getSpan is not a function at NextTracerImpl.getActiveScopeSpan ([REDACTED]/create-next-app-sample/node_modules/next/dist/server/lib/trace/tracer.js:50:22) at NextTracerImpl.trace ([REDACTED]/create-next-app-sample/node_modules/next/dist/server/lib/trace/tracer.js:69:103) at DevServer.handleRequest ([REDACTED]/create-next-app-sample/node_modules/next/dist/server/base-server.js:166:41) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async DevServer.handleRequest ([REDACTED]/create-next-app-sample/node_modules/next/dist/server/dev/next-dev-server.js:839:16) { digest: undefined } ``` ### Expected Behavior The home page should render in the browser. ### Which browser are you using? (if relevant) Chrome Version 111.0.5563.146 (Official Build) (x86_64) ### How are you deploying your application? (if relevant) locally <sub>From [SyncLinear.com](https://synclinear.com) | [NEXT-1100](https://linear.app/vercel/issue/NEXT-1100/unhandledrejection-error-[typeerror]-tracegetspan-is-not-a-function)</sub>
https://github.com/vercel/next.js/issues/48118
https://github.com/vercel/next.js/pull/50554
0a61aa18d68bbc6840964cc67c5506abefc132d2
a0314c09cc5dfc0a45b41a96080cac57f8c728ba
"2023-04-08T01:08:21Z"
javascript
"2023-06-02T06:28:29Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,104
["packages/next/src/client/components/router-reducer/compute-changed-path.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/(group)/intercepting-parallel-modal/[username]/@feed/page.js", "test/e2e/app-dir/parallel-routes-and-interception/app/(group)/intercepting-parallel-modal/[username]/@modal/(..)photo/[id]/page.js", "test/e2e/app-dir/parallel-routes-and-interception/app/(group)/intercepting-parallel-modal/[username]/@modal/default.js", "test/e2e/app-dir/parallel-routes-and-interception/app/(group)/intercepting-parallel-modal/[username]/layout.js", "test/e2e/app-dir/parallel-routes-and-interception/app/(group)/intercepting-parallel-modal/photo/[id]/page.js", "test/e2e/app-dir/parallel-routes-and-interception/app/(group)/intercepting-parallel-modal/photo/layout.js"]
13.3.0 Intercepting with grouped app does not work
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 18.14.0 npm: 9.3.1 Yarn: 1.22.19 pnpm: 7.27.0 Relevant packages: next: 13.3.1-canary.2 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://github.com/khuezy/next-intercept ### To Reproduce - `npm install` - `npm run dev` - go to localhost:3000/shop - Click on `Go to nested`, route is stuck - go to localhost:3000/shop_no_group - Click on `Go to nested`, route is intercepted ### Describe the Bug When using group routes, interception does not work. eg: ``` app/(group)/shop ``` ### Expected Behavior When using grouped routes, interception should work. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/48104
https://github.com/vercel/next.js/pull/48351
00b1c49c2bbb7c811783a356f4f64afc99c207fd
0faf8bc900b7bffc1c944a177904a44381109039
"2023-04-07T19:30:47Z"
javascript
"2023-04-13T21:00:32Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,087
["packages/next/src/client/components/app-router-announcer.tsx"]
[bug] CLS occurs, when adding `gap` property at `layout.tsx`
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 Binaries: Node: 16.14.0 npm: 8.3.1 Yarn: 1.22.18 pnpm: 7.29.1 Relevant packages: next: 13.3.1-canary.1 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue It is not a complex bug! ### To Reproduce ## Dev Stack - nextjs - tailwindcss > **Note** > > In this example, I will use `tailwindcss` for styling. But the **main cause of this bug is basically same.** ## 1. Add flex layout at `layout.tsx` The important thing is the layout **should be include `height: 100vh` property, which is same as `h-screen`** In `layout.tsx` ```ts import "./tailwind.css" export default function RootLayout({ children, }: { children: React.ReactNode }) { return ( <html lang="en"> <body className="flex flex-col items-center justify-center h-screen">{children}</body> </html> ) } ``` ## 2. Add `gap` property in `layout.tsx` ```tsx // extract non-problem styles const layout = "flex flex-col items-center justify-center h-screen" export default function RootLayout({ children, }: { children: React.ReactNode }) { return ( <html lang="en"> <body className={`${layout} gap-32`}>{children}</body> </html> ) } ``` ## 3. CLS occurs, watch report video https://user-images.githubusercontent.com/53421296/230630800-ad2f14a1-640e-4d04-acd0-ac2b68aa90b6.mov You can see that the CLS happens a total of 2 times, equal to the size of the gap. ### Describe the Bug ## Description πŸ› οΈ CLS happens a total of 2 times, equal to the size of the gap. For example if gap is `10px`, then CLS is occurs twice(`10px` ⬇️ `10px` ⬇️). If the gap is `0px`, the CLS will seemingly not happen, **but actually happen twice by `0px`.** ```tsx const Layout = ({ children }) => <body className="flex flex-col h-screen gap-10">{children}</body> ``` --- ## Cause πŸ’‘ <img width="750" alt="prob dom" src="https://user-images.githubusercontent.com/53421296/230630287-95d5b017-1d7d-4664-aabc-5fa2163f51bd.png"> The clue to the problem is that the CLS happened twice. As you can see, there is two `Shadow DOM` in DOM tree. 1. `div` with class `"ai-modal-container"` ```html <div class="ai-modal-container" style="font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Noto Sans&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;; line-height: 18px;"></div> ``` 2. `<next-route-announcer></next-route-announcer>` <img width="624" alt="cause" src="https://user-images.githubusercontent.com/53421296/230633136-b23747d9-4505-4fb0-8d4b-e55c396dae7a.png"> It seems that when a shadowDOM is first mounted in the DOM tree, it is considered a DOM element and causes CLS, and when it is subsequently hidden by the shadow-root, it is not considered a DOM element. --- ## Suggestion βœ… Add **`display: none` to the two Shadow DOM**, then it will be not affect layout shift, because the browser skips layout calculations for those elements. ### Expected Behavior CLS is not happen in first DOM mounting, when client side rendering completed. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/48087
https://github.com/vercel/next.js/pull/49034
5bc1e65efd5e9fa6ab16b63adbb080756f853766
1a71bea612e2b447f04447d289df7853e1bddbff
"2023-04-07T15:27:14Z"
javascript
"2023-05-01T14:02:48Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,081
["test/e2e/app-dir/metadata-dynamic-routes/app/font/opengraph-image.tsx", "test/e2e/app-dir/metadata-dynamic-routes/app/font/opengraph-image2.tsx", "test/e2e/app-dir/metadata-dynamic-routes/app/font/page.tsx", "test/e2e/app-dir/metadata-dynamic-routes/assets/typewr__.ttf", "test/e2e/app-dir/metadata-dynamic-routes/index.test.ts"]
[NEXT-1089] Custom fonts in `ImageResponse` not working in App Dir
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 Binaries: Node: 18.12.0 npm: 8.19.2 Yarn: 1.22.18 pnpm: 7.25.1 Relevant packages: next: 13.3.1-canary.1 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Data fetching (gS(S)P, getInitialProps), Metadata (metadata, generateMetadata, next/head, head.js) ### Link to the code that reproduces this issue https://stackblitz.com/edit/github-f6jt4y?file=app%2Fopengraph-image.js ### To Reproduce 1. Run the Server 2. Check the error in console 3. Alternatively open the generated path in new URL to get the error. ### Describe the Bug While importing custom fonts, it throws the following error. ``` error - unhandledRejection: Error [TypeError]: Failed to parse URL from /_next/static/media/Inter-Regular.f356e84a.woff at new Request (node:internal/deps/undici/undici:9474:19) at fetch1 (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react/cjs/react.shared-subset.development.js:193:39) at doOriginalFetch (/Users/.../opengraph/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/lib/patch-fetch.js:159:24) at /Users/.../opengraph/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/lib/patch-fetch.js:253:20 { digest: undefined } ``` ### Expected Behavior It should not throw error. Instead it should load properly. ### Which browser are you using? (if relevant) Any ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1089](https://linear.app/vercel/issue/NEXT-1089/custom-fonts-in-imageresponse-not-working-in-app-dir)</sub>
https://github.com/vercel/next.js/issues/48081
https://github.com/vercel/next.js/pull/54274
adc413b3fb09be41b30ff7a86481e8f42cbb5447
85606472e40d9a314511d763ec788727d55b2214
"2023-04-07T14:00:44Z"
javascript
"2023-08-19T14:29:18Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,077
["packages/next/src/server/image-optimizer.ts"]
Image not working on production
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023 Binaries: Node: 16.15.0 npm: 8.18.0 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.3.1-canary.0 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) Image optimization (next/image, next/legacy/image), Jest (next/jest) ### Link to the code that reproduces this issue https://github.com/muhammedogz/next-image-error ### To Reproduce `npx create-next-app@latest` after created update next-config ```ts /** * @type {import('next').NextConfig} **/ const config = { images: { domains: ["avatars.githubusercontent.com"], }, output: "standalone", reactStrictMode: false, }; module.exports = config; ``` use this docker file ``` # Install dependencies only when needed FROM node:16-alpine AS deps RUN apk add --no-cache libc6-compat WORKDIR /app COPY package.json ./ RUN npm i --legacy-peer-deps # Rebuild the source code only when needed FROM node:16-alpine AS builder ENV NEXT_TELEMETRY_DISABLED 1 WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . RUN npm run build # Production image, copy all the files and run next FROM node:16-alpine AS runner ENV NEXT_TELEMETRY_DISABLED 1 ENV PORT 3000 WORKDIR /app RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs # You only need to copy next.config.js if you are NOT using the default configuration COPY --from=builder /app/next.config.js ./ COPY --from=builder /app/public ./public COPY --from=builder /app/package.json ./package.json COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static USER nextjs EXPOSE 3000 ENTRYPOINT ["node", "server.js"] ``` modify index.ts ```ts import Image from "next/image"; export default function Home() { return ( <div> test <Image alt="test" src={"https://avatars.githubusercontent.com/u/14985020?s=200&v=4"} width={100} height={100} /> </div> ); } ``` After that, run docker commands in the root of the project ``` docker build . docker run -dp 3000:3000 <image-id> ``` Locate to the http://localhost:3000/ image is not shown. Helpfull info Docker Logs output ``` Error: Cannot find module 'next/dist/compiled/jest-worker' Require stack: - /app/node_modules/next/dist/server/lib/squoosh/main.js - /app/node_modules/next/dist/server/image-optimizer.js - /app/node_modules/next/dist/server/next-server.js - /app/server.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15) at Function.mod._resolveFilename (/app/node_modules/next/dist/build/webpack/require-hook.js:23:32) at Function.Module._load (node:internal/modules/cjs/loader:871:27) at Module.require (node:internal/modules/cjs/loader:1098:19) at require (node:internal/modules/cjs/helpers:108:18) at Object.<anonymous> (/app/node_modules/next/dist/server/lib/squoosh/main.js:8:19) at Module._compile (node:internal/modules/cjs/loader:1196:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10) at Module.load (node:internal/modules/cjs/loader:1074:32) at Function.Module._load (node:internal/modules/cjs/loader:909:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/app/node_modules/next/dist/server/lib/squoosh/main.js', '/app/node_modules/next/dist/server/image-optimizer.js', '/app/node_modules/next/dist/server/next-server.js', '/app/server.js' ] } ``` ### Describe the Bug Images are not shown. Server sending 500 for images. Exact same docker file and exact same project working yesterday. I tried it with different nextjs versions. ### Expected Behavior Show the images without error ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) Dockarized and deploy to the AWS
https://github.com/vercel/next.js/issues/48077
https://github.com/vercel/next.js/pull/48513
77204c9ee202c660ac12c0bd4bfa2ae08ecaac7b
12472b4c60069771faf5eebf37013dfcee1bce5d
"2023-04-07T12:54:53Z"
javascript
"2023-04-18T11:34:21Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,061
["packages/next/src/server/dev/next-dev-server.ts", "packages/next/src/server/dev/static-paths-worker.ts"]
v13.3.0 getStaticPaths Fails with error - Error: Call retries were exceeded
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 19.8.1 npm: 9.5.1 Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.1-canary.0 eslint-config-next: 13.2.4 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ ### Link to the code that reproduces this issue https://github.com/vercel/next.js/ ### To Reproduce ```Typescript export const getStaticPaths: GetStaticPaths = async () => { const mySlugs = await getMySlugs(); // returns a array of ~2500 strings var paths = mySlugs.map(s => { return { params: { slug: s } }; }) var res = { paths: paths, fallback: false }; return res; } ``` ### Describe the Bug The get request `await getMySlugs();` to get my slugs works fine, but I Get this error: ``` error - Error: Call retries were exceeded at ChildProcessWorker.initialize (/Users/re/abc/my-proj/node_modules/next/dist/compiled/jest-worker/index.js:1:11661) at ChildProcessWorker._onExit (/Users/re/abc/my-proj/node_modules/next/dist/compiled/jest-worker/index.js:1:12599) at ChildProcess.emit (node:events:512:28) at ChildProcess._handle.onexit (node:internal/child_process:293:12) { digest: undefined } ``` ### Expected Behavior getStaticPaths should not throw an error because `await getMySlugs();` returns fine. I should see the page available. It works in 12.5.4 ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_
https://github.com/vercel/next.js/issues/48061
https://github.com/vercel/next.js/pull/48322
a140620e138344d750c018bf5729523856208c79
a234c26c33ce14771aab9a94776b3d2d8fe1776b
"2023-04-07T04:51:22Z"
javascript
"2023-04-13T22:42:55Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,040
["packages/next/src/server/next-server.ts", "test/e2e/middleware-rewrites/app/middleware.js", "test/e2e/middleware-rewrites/app/next.config.js", "test/e2e/middleware-rewrites/test/index.test.ts"]
[NEXT-1104] NextResponse.rewrite is not forwarding the request body to external hosts in dev
### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:43 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T8112 Binaries: Node: 19.6.1 npm: 9.4.0 Yarn: N/A pnpm: 7.27.0 Relevant packages: next: 13.2.5-canary.33 eslint-config-next: 13.2.4 react: 18.2.0 react-dom: 18.2.0 ``` ### Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Middleware / Edge (API routes, runtime) ### Link to the code that reproduces this issue https://github.com/dbk91/nextresponse-defect ### To Reproduce Steps to reproduce specific to the linked repo: 1. Spin up a server on `http://localhost:4000` where you can log or inspect the body of a request. 2. Run `next dev` to start the development server for Next.js 3. Load the home page. 4. A POST request to `http://localhost:4000/test` should happen on component mount with a JSON body of `{"hello": 123}` ### Describe the Bug The log shows no output of the JSON body. ### Expected Behavior The server should receive `{"hello":123}` in the request body. ### Which browser are you using? (if relevant) _No response_ ### How are you deploying your application? (if relevant) _No response_ <sub>[NEXT-1104](https://linear.app/vercel/issue/NEXT-1104/nextresponserewrite-is-not-forwarding-the-request-body-to-external)</sub>
https://github.com/vercel/next.js/issues/48040
https://github.com/vercel/next.js/pull/49487
20e13490ab39eafa1262703e40742fd38af7bef1
71d354363e3098bbf4218af43c452c360334fb8c
"2023-04-06T18:54:24Z"
javascript
"2023-05-08T22:22:02Z"
closed
vercel/next.js
https://github.com/vercel/next.js
48,036
["packages/next-swc/crates/next-core/js/src/entry/app/route.ts", "packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route-WEB-869/input/.env", "packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route-WEB-869/input/app/[slug]/route.ts", "packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route-WEB-869/input/app/layout.tsx", "packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route-WEB-869/input/app/page.tsx", "packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route-WEB-869/input/app/test.tsx", "packages/next-swc/crates/next-dev-tests/tests/integration/next/app/route-WEB-869/input/next.config.js"]
[WEB-869] Turbopack Route Handlers don't have ENV vars
Hi, Currently, i'm using the Next 13.2.5-canary.32 and it works well for getting the env variables in the middleware however i can't get any of them inside the route handlers. So far, i only have the `NEXT_RUNTIME`. _Originally posted by @anthonytison in https://github.com/vercel/next.js/issues/47766#issuecomment-1498905854_ <sub>[NEXT-961](https://linear.app/vercel/issue/NEXT-961/turbopack-route-handlers-dont-have-env-vars)</sub>
https://github.com/vercel/next.js/issues/48036
https://github.com/vercel/next.js/pull/48048
8d3e42e556ea2014ca879b4a3586e554700333aa
10b93557818abe0b3875ae7bc62cc8c67f335238
"2023-04-06T17:38:02Z"
javascript
"2023-04-07T02:33:55Z"