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 | 54,454 | ["packages/next/src/server/lib/router-server.ts", "test/e2e/multi-zone/app/apps/first/pages/index.tsx", "test/e2e/multi-zone/app/apps/second/pages/index.tsx", "test/e2e/multi-zone/multi-zone.test.ts"] | Multi-zone not working on version 13.4.19. 13.4.3 works fine | ### 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: 16.14.0
npm: 8.3.1
Yarn: 1.22.19
pnpm: 7.32.2
Relevant Packages:
next: 13.4.19
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: N/A
Next.js Config:
output: N/A
warn - Latest canary version not detected, detected: "13.4.19", newest: "13.4.20-canary.3".
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
✨ Done in 5.96s.
```
### 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
yarn dev
### To Reproduce
on `next.config.js` add
```
const { APP_URL } = process.env
/** @type {import('next').NextConfig} */
const nextConfig = {
async rewrites() {
return [
{
source: '/:path*',
destination: `/:path*`,
},
{
source: '/app',
destination: `${APP_URL}/app`,
},
{
source: '/app/:path*',
destination: `${APP_URL}/app/:path*`,
},
]
},
}
module.exports = nextConfig
```
on `.env.local` add
APP_URL=http://localhost:3001
http://localhost:3001 references another nextjs app on port 3001
### Describe the Bug
When using Multi-zone to video a second app. The app refreshes indefinitely. The terminal prints https://nextjs.org/docs/messages/fast-refresh-reload
### Expected Behavior
Downgrading to version 13.4.3 works fine. The app doesn't refresh indefinitely when using multi-zone
### Which browser are you using? (if relevant)
Version 1.56.20 Chromium: 115.0.5790.171 (Official Build) (x86_64)
### How are you deploying your application? (if relevant)
not deployed yet | https://github.com/vercel/next.js/issues/54454 | https://github.com/vercel/next.js/pull/59307 | 1f6defd4b097fb24d1fcf75a12cb77f082ed9706 | 61b825be3937dc1f095cde942d623c79559b2c53 | "2023-08-23T16:41:08Z" | javascript | "2023-12-06T20:15:42Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,325 | ["packages/next/src/server/lib/router-utils/filesystem.ts", "test/e2e/dynamic-route-interpolation/index.test.ts", "test/e2e/dynamic-route-interpolation/pages/api/dynamic/[slug].js", "test/e2e/dynamic-route-interpolation/pages/blog/[slug].js"] | Dynamic Router - url decoded parameter results in javascript 404 | ### 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.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64
Binaries:
Node: 18.15.0
npm: 9.5.0
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 13.4.16
eslint-config-next: 13.4.16
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### 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 or a replay of the bug
https://github.com/klassm/next-url-encoding-reproduce
### To Reproduce
- Checkout the reproduction repo
- Run the example
```bash
npm i
npm run startReproduce # builds the next app in prod mode, starts the dev server
npm run testReproduce # runs jest
```
One of the two tests will fail:
```
> testReproduce
> jest
FAIL ./runMe.spec.ts
run me
✓ should be able to access url encoded chunks (113 ms)
✕ should be able to access non url encoded chunks (25 ms)
● run me › should be able to access non url encoded chunks
AxiosError: Request failed with status code 404
at settle (node_modules/axios/lib/core/settle.js:19:12)
at Unzip.handleStreamEnd (node_modules/axios/lib/adapters/http.js:570:11)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 passed, 2 total
Snapshots: 0 total
Time: 2.541 s
```
### Describe the Bug
When opening a dynamic routed page, next.js will load a js file from the server. The dynamic parameter, in this case [id], will be url encoded.
According to [RFC2616](https://www.rfc-editor.org/rfc/rfc2616#section-3.2.3) this parameter can be url encoded or not - the app should handle it the same way [1]. However, when trying to load the js file without url encoding the server returns a 404.
Why is this bad?
It looks like using nginx as a reverse proxy in front of a next application will already remove the url encoding from the frontend. The request then runs in a 404, resulting in the page not properly being loaded.
I also looked when this issue was introduced - with `13.4.12` it was still green.
[1]
```
Characters other than those in the "reserved" and "unsafe" sets (see
RFC 2396 [42]) are equivalent to their ""%" HEX HEX" encoding.
For example, the following three URIs are equivalent:
[http://abc.com:80/~smith/home.html](http://abc.com/~smith/home.html)
[http://ABC.com/%7Esmith/home.html](http://abc.com/~smith/home.html)
http://abc.com/:/%7esmith/home.html
```
### Expected Behavior
Both URL encoded and non URL encoded URLs are handled the same way and result in a 200.
### 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/54325 | https://github.com/vercel/next.js/pull/56187 | a2f9ef5a34418d562581f54353ed51491a019484 | 3172cfedc8b759fec89fda373c86b86931fc02f1 | "2023-08-21T07:34:38Z" | javascript | "2023-10-02T22:02:49Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,296 | ["docs/02-app/02-api-reference/02-file-conventions/01-metadata/manifest.mdx"] | Docs: missing docs for dynamic manifest.ts metadata route | ### What is the improvement or update you wish to see?
unless i missed something, the dynamic `manifest.ts`/`manifest.tsx` metadata route is currently not documented. at least it is not mentioned [here](https://nextjs.org/docs/app/api-reference/functions/generate-metadata#manifest)
### Is there any context that might help us understand?
nope
### Does the docs page already exist? Please link to it.
_No response_
<sub>[DX-1934](https://linear.app/vercel/issue/DX-1934/docs-missing-docs-for-dynamic-manifestts-metadata-route)</sub> | https://github.com/vercel/next.js/issues/54296 | https://github.com/vercel/next.js/pull/54380 | 9ca82f68ed304ae95cf44d510f299c0e816bf747 | 83394b900b56e8fdedca37c0b715aea6a04d2008 | "2023-08-20T08:24:20Z" | javascript | "2023-08-22T14:35:41Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,269 | ["docs/02-app/01-building-your-application/09-upgrading/02-app-router-migration.mdx"] | onClick not working in fresh project in next 13.4.17 | ### Verify canary release
- [] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```bash
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.4.16
eslint-config-next: 13.4.16
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/shulinnn/next-reprod
### To Reproduce
Use npx create npx create-next-app@latest with app router add onClick handler to whatever element.
### Describe the Bug
onClick handler on any element simply doesnt work.
### Expected Behavior
Should log "XD" into the console.
### 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/54269 | https://github.com/vercel/next.js/pull/54285 | 85606472e40d9a314511d763ec788727d55b2214 | 76997cc053b115de8be80c2b55226285083df5c4 | "2023-08-19T10:09:09Z" | javascript | "2023-08-20T03:03:02Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,240 | ["packages/next/src/client/components/layout-router.tsx"] | App Router: Link component is not respecting scroll-behavior: smooth when only hash changes. | ### 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: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 16.15.1
npm: 8.11.0
Yarn: 1.22.19
pnpm: 8.6.11
Relevant Packages:
next: 13.4.18-canary.0
eslint-config-next: 13.4.18-canary.0
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Routing (next/router, next/navigation, next/link)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/coreyleelarson/scroll-behavior-smooth
### To Reproduce
Toggle between the different nav links to observe the difference in behavior between the anchors and Link components.
### Describe the Bug
Link component is not respecting `scroll-behavior: smooth` when only hash changes. If I append `!important` it works, but that should not be required.
There was a previous bug report for this (https://github.com/vercel/next.js/issues/51721) but the linked fix does not appear to resolve the issue in the latest version.
### Expected Behavior
Link component should scroll smoothly to the target anchor when `scroll-behavior: smooth` is set without `!important`.
### Which browser are you using? (if relevant)
Chrome 116.0.5845.96
### How are you deploying your application? (if relevant)
_No response_ | https://github.com/vercel/next.js/issues/54240 | https://github.com/vercel/next.js/pull/54243 | 0e78798f37ce9d68b56e4dcb4ca0011e9e1d4959 | 42abfd694d9aa35da77d58cb81542e77743bf817 | "2023-08-18T18:37:49Z" | javascript | "2023-08-18T20:58:45Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,229 | ["packages/next-swc/crates/core/src/server_actions.rs", "packages/next-swc/crates/core/tests/fixture/server-actions/client/4/input.js", "packages/next-swc/crates/core/tests/fixture/server-actions/client/4/output.js", "test/e2e/app-dir/actions/app/client/actions.js", "test/e2e/app-dir/actions/app/client/page.js"] | NextJS crashes when importing a re-exported action in `use server` file | ### 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.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000
Binaries:
Node: 18.13.0
npm: 8.19.3
Yarn: 1.22.19
pnpm: 7.26.2
Relevant Packages:
next: 13.4.18-canary.0
eslint-config-next: 13.4.18
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/samijaber/repro-nextjs-bundling-issues/tree/2caedce9eafbb8d5d51ad6faac18dde3a48cf516
### To Reproduce
- clone https://github.com/samijaber/nextjs-repro-issues/tree/ece352ad8312b19d58265f2b6ed7da1583220558
- `npm install`
- `npm dev`
You will see this:
<img width="1276" alt="CleanShot 2023-08-18 at 10 33 32@2x" src="https://github.com/vercel/next.js/assets/1393142/5dcc4344-dd55-4de6-926c-43c8a67dd0ee">
Now, either:
- remove the `"use server"` comment from the top of `nextjs-app/src/dist/USE_SERVER_BUNDLE-705b463c.mjs`, and it will work.
- remove the renamed export here: https://github.com/samijaber/nextjs-repro-issues/commit/ece352ad8312b19d58265f2b6ed7da1583220558#diff-18d0a2ba49933a2dece78d29a8ded5039ebee1c7eac2ee9c80e0550c83b5cb1dR7, such that the export itself is directly called `export const a = `. This shows a new issue
### Describe the Bug
NextJS is unable to find an import that exists in a file if that file has a `"use server"` banner. It says:
```
Attempted import error: 'a' is not exported from './USE_SERVER_BUNDLE.mjs' (imported as 'e').
```
even though `a` is clearly exported by that file.
NOTE: the files in `src` result from bundling a library using `vite`/`rollup`. This is why they don't necessarily look like how a human would write them. My real-case issue is around bundling an npm package for consumption by NextJS, so this is why I am showing the bug occuring in this particular format.
### Expected Behavior
The import should succeed.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1533](https://linear.app/vercel/issue/NEXT-1533/nextjs-crashes-when-importing-a-re-exported-action-in-use-server-file)</sub> | https://github.com/vercel/next.js/issues/54229 | https://github.com/vercel/next.js/pull/54241 | 2bb12fc6bb9c9ea4e508337f53009ca097d1ef8e | 0e78798f37ce9d68b56e4dcb4ca0011e9e1d4959 | "2023-08-18T14:53:58Z" | javascript | "2023-08-18T20:41:32Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,210 | [".github/workflows/pull_request_approved.yml"] | "Notify about approved but still open PRs" runs on forks | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Which area(s) of Next.js are affected? (leave empty if unsure)
CI / tooling
### To Reproduce
1. Fork the next.js repository to another GitHub account.
2. Each day you'll recieve an email stating 'Run failed: Notify about approved but still open PRs'
### Expected Behavior
Forking the repository does not result in repeated notifications of CI failures
### Describe the Bug
This repository has an action for notifying about approved but open PRs (https://github.com/vercel/next.js/pull/53541). It requires a Slack token to work.
However, most forks will not have set up a Slack token / equivalent channel, and this creates failing CI noise that is annoying.
Possible solutions:
1. In the action file, check we are in the next.js org
2. In the action file, only run the script if SLACK_TOKEN is set | https://github.com/vercel/next.js/issues/54210 | https://github.com/vercel/next.js/pull/54219 | 5764c6e900fe0a0e3b3159d47aba9a920431ac88 | 725ddc7371f80cca273779d37f961c3e20356f95 | "2023-08-18T08:15:51Z" | javascript | "2023-08-18T17:40:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,192 | ["Cargo.lock", "Cargo.toml"] | Next.js 13.4.9 - SWC minification breaks production builds | ### 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.16.0
npm: 9.5.1
Yarn: 1.22.19
pnpm: 8.6.11
Relevant Packages:
next: 13.4.17
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
SWC minifier (swcMinify: true)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/jantimon/next-swc-minification-reproduction/
### To Reproduce
1. clone the reproduction example
```bash
git clone https://github.com/jantimon/next-swc-minification-reproduction.git
npm i
```
2. As the SWC minifier runs only during build you have to create a build:
```bash
npm run build
npm run start
```
3. Open http://localhost:3000/
4. enter anything into the input field
5. click the button to cause a rerender
6. react will unmount the input field and mount it again
7. the input is empty

### Describe the Bug
The bug was introduced in `[email protected]` - all early versions (e.g. `[email protected]`) work fine.
The issue seems to be part of this change: https://github.com/vercel/next.js/compare/v13.4.9-canary.1...v13.4.9-canary.2
ContextExample.tsx
```tsx
import { ReactNode, createContext } from "react";
const Context = createContext({});
export const ContextProvider = ({ children }: { children: ReactNode}) => {
return <Context.Provider value={{}}>{children}</Context.Provider>;
}
export const ContextDemo = {
Provider: ContextProvider
}
```
Client Component.tsx
```tsx
"use client";
import { useState } from "react";
import { ContextDemo } from "./ContextExample";
export const ClientCompoenent = () => {
const [count, setCount] = useState(0);
return (
<>
<ContextDemo.Provider>
<input />
</ContextDemo.Provider>
<button
onClick={() => {
console.log("click");
setCount(count + 1);
}}
>
+1 (rerender)
</button>
</>
);
};
```
During minifcation SWC will inline the `ContextProvider` component right into the render function:
```js
"use strict";
n.r(r),
n.d(r, {
ClientCompoenent: function () {
return u;
},
});
var t = n(7437),
o = n(2265);
let s = (0, o.createContext)({}),
u = () => {
let [e, r] = (0, o.useState)(0);
return (0, t.jsxs)(t.Fragment, {
children: [
(0, t.jsx)(
// 🐞 here is the inlined function (scoped to `u`)
// therefore the function will recreated for each render:
(e) => {
let { children: r } = e;
return (0, t.jsx)(s.Provider, { value: {}, children: r });
},
{ children: (0, t.jsx)("input", {}) }
),
(0, t.jsx)("button", {
onClick: () => {
console.log("click"), r(e + 1);
},
children: "+1 (rerender)",
}),
],
});
};
```
It looks like SWC does this minification only if a dot is in the component name.
changing `ContextDemo.Provider` to `ContextDemoProvider` fixes the issue.
### Expected Behavior
Running `npm dev` will not trigger the swc minifcation and runs properly.
A rerender will not unmount components and the input will keep its value:

### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1530](https://linear.app/vercel/issue/NEXT-1530/nextjs-1349-swc-minification-breaks-production-builds)</sub> | https://github.com/vercel/next.js/issues/54192 | https://github.com/vercel/next.js/pull/54368 | 0277ef0931ec5453ed7b1004da66e98c45bcaa01 | c792baa7ceab68e5dbe4d6b3a242be889de4e9bf | "2023-08-17T20:12:29Z" | javascript | "2023-08-22T20:46:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,184 | ["packages/next/src/client/components/app-router.tsx", "test/lib/browsers/base.ts", "test/lib/browsers/playwright.ts", "test/production/bfcache-routing/app/layout.js", "test/production/bfcache-routing/app/page.js", "test/production/bfcache-routing/index.test.ts", "test/production/bfcache-routing/next.config.js"] | App Router crashes when navigating back into the application using browser buttons | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```bash
npx next info
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 18.16.0
npm: 9.7.1
Yarn: 1.22.19
pnpm: 7.22.0
Relevant Packages:
next: 13.4.17
eslint-config-next: 13.4.17
react: 18.2.0
react-dom: 18.2.0
typescript: 4.6.2
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
npx create-next-app example-app
### To Reproduce
In **any** App router app (just run `npx create-next-app example-app`), do:
1. run npm run build && npm run start,
2. when it runs open a new tab in your browser,
3. type localhost:3000
4. App loads normally
5. Browse back with the back button
6. Browse forward with the forward button
7. App crashes
### Describe the Bug
Thanks to https://github.com/vercel/next.js/discussions/54180, which outlines that the crash is originating on accessing `tree[1]` without checking for undefined.
The error first appears on the major release: **13.4.17** and it is still present in canary.
I do believe, even the next.js docs page are suffering this issue.
https://github.com/vercel/next.js/assets/21013447/84112bd0-ba1b-4889-a08c-1a76df2f84d2
The video shows that navigating back to next.js docs crashes, and forward to the toy app, crashes too.
### Expected Behavior
The page should not crash when navigating back into it, using browser controls.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1528](https://linear.app/vercel/issue/NEXT-1528/app-router-crashes-when-navigating-back-into-the-application-using)</sub> | https://github.com/vercel/next.js/issues/54184 | https://github.com/vercel/next.js/pull/54198 | 631018a674123466e92a4774e9806654a118f914 | c676f9357ee1e9f364c1e20265b3ab70bf207cf5 | "2023-08-17T16:26:15Z" | javascript | "2023-08-17T22:05:26Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,168 | ["packages/next/src/server/lib/router-utils/setup-dev.ts"] | typedRoutes does not work while running on the 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.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64
Binaries:
Node: 18.17.1
npm: 9.6.7
Yarn: N/A
pnpm: 8.6.12
Relevant Packages:
next: 13.4.16
eslint-config-next: 13.4.16
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### 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 or a replay of the bug
I will prepare it later.
### To Reproduce
Start the development server with typedRoutes enabled.
### Describe the Bug
Due to the following PR, [devPageFiles](https://github.com/vercel/next.js/blob/canary/packages/next/src/build/webpack/plugins/next-types-plugin/shared.ts) are no longer being updated, so link type definition files are not being generated properly while running the development server.
https://github.com/vercel/next.js/pull/52492/files#diff-2f6fd5a9538abfaf3d5b76a82a8d1ffa029f84a36f0cdae5460520c5cfc2db6bL84
Currently devPageFiles is not updated from anywhere.
https://github.com/search?q=repo%3Avercel%2Fnext.js%20devPageFiles&type=code
### Expected Behavior
A link type definition file is generated while the development server is running.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1531](https://linear.app/vercel/issue/NEXT-1531/typedroutes-does-not-work-while-running-on-the-dev-server)</sub> | https://github.com/vercel/next.js/issues/54168 | https://github.com/vercel/next.js/pull/54224 | 803bbe5c9388bb9b5af3b75ba6f1a76332e74112 | ec438418a437068f104f8f7892abe2fb3e2b7988 | "2023-08-17T10:57:50Z" | javascript | "2023-08-18T14:16:11Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,163 | ["packages/next-swc/crates/next-core/js/src/entry/app-renderer.tsx", "packages/next-swc/crates/next-core/js/src/entry/app/edge-page-bootstrap.ts", "packages/next/src/server/app-render/app-render.tsx", "packages/next/src/server/app-render/types.ts", "test/e2e/app-dir/app-basepath/app/redirect/page.js", "test/e2e/app-dir/app-basepath/index.test.ts"] | `redirect()` function doesn't consider 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: win32
Arch: x64
Version: Windows 10 Enterprise
Binaries:
Node: 16.15.1
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.4.17-canary.2
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 Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/XDean/next-bug/tree/redirect-function-basepath
### To Reproduce
- Goto `/dev/redirect`
- It redirect to `/target`. The correct path should be `/dev/target`
### Describe the Bug
The `redirect` function should consider `basePath` config. But it not.
Another strange behavior is, If you access `/dev/link` , click the link redirect to `/direct`, it works.
### Expected Behavior
`redirect('/target)` can goto `/dev/target`
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1529](https://linear.app/vercel/issue/NEXT-1529/redirect-function-doesnt-consider-basepath)</sub> | https://github.com/vercel/next.js/issues/54163 | https://github.com/vercel/next.js/pull/54277 | 311eea4c6ab847548d81421a8edbf86ac77341f9 | f2a3fd9fc3e00fd51265017a3abdf46d0e53ccbe | "2023-08-17T09:39:53Z" | javascript | "2023-08-20T03:32:52Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,133 | ["packages/next/src/build/utils.ts"] | nextjs 13.4.13+ broke self-hosted docker setup | ### 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: Thu Jun 8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103
Binaries:
Node: 18.17.1
npm: 9.6.7
Yarn: N/A
pnpm: 8.6.12
Relevant Packages:
next: 13.4.16
eslint-config-next: 13.4.16
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: standalone
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
Standalone mode (output: "standalone")
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
### To Reproduce
See description
### Describe the Bug
I'm using dockerfile from the examples.
After upgrading to version 13.4.13-13.4.16, my application stopped working properly.
calling the 'router.push' function results in hard navigation
in middleware redirect
before: https://my-site.com/some-path
now: http://172.18.0.6:3000/some-path
### Expected Behavior
13.4.12 behavior
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
self-hosted | https://github.com/vercel/next.js/issues/54133 | https://github.com/vercel/next.js/pull/54445 | 724ece8508456eed74414b47a0073e56706d42a7 | 42ad2cef2297159aea13f948200daae2a91ab696 | "2023-08-16T17:16:12Z" | javascript | "2023-09-14T15:30:56Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,105 | ["docs/02-app/01-building-your-application/07-configuring/02-eslint.mdx"] | `eslint` is not installed as a dev dependency | ### 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: #85-Ubuntu SMP Fri Jul 7 15:25:09 UTC 2023
Binaries:
Node: 18.17.1
npm:
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.4.16
eslint-config-next: 13.4.16
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
CLI (create-next-app)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/vercel/vercel/tree/main/examples/nextjs
### To Reproduce
1. `npx create-next-app@latest my-app --ts --no-tailwind --eslint --app --no-src-dir --import-alias "@/*" --use-npm`
2. `cd my-app && node -e 'console.log(JSON.parse(fs.readFileSync("package.json")).devDependencies)'`
### Describe the Bug
The [documentation](https://nextjs.org/docs/pages/building-your-application/configuring/eslint) states:
> If either of the two configuration options are selected, Next.js will automatically install `eslint` and `eslint-config-next` as development dependencies in your application and create an `.eslintrc.json` file in the root of your project that includes your selected configuration.
however both packages are installed as direct dependencies. The ESLint documentation also instructs installing it as a dev dependency.
Either the documentation is wrong or both package should really be installed as development dependencies.
### Expected Behavior
During installation of ESLint, it is saved as a dev dependency.
<sub>[NEXT-1520](https://linear.app/vercel/issue/NEXT-1520/eslint-is-not-installed-as-a-dev-dependency)</sub> | https://github.com/vercel/next.js/issues/54105 | https://github.com/vercel/next.js/pull/55023 | 1b844600ce206fffbd8de72527303f6cb2e582af | 2f31fa947690d1712574696105c2a12af20ff4b1 | "2023-08-16T10:55:10Z" | javascript | "2023-09-05T19:01:27Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,094 | ["packages/next/src/server/web/spec-extension/request.ts", "test/unit/web-runtime/next-request.test.ts"] | Since Next.js 13.4.13, custom headers no longer can be set in middleware (works fine with 13.4.12) | ### 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.4.14-canary.0
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### 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://codesandbox.io/p/sandbox/with-next-13-4-13-7zh3kl
### To Reproduce
Juste compare the two barebone examples (identical except for the Next.js version).
With Next.js 13.4.12: [https://codesandbox.io/p/sandbox/with-next-13-4-12-lm62df](https://codesandbox.io/p/sandbox/with-next-13-4-12-lm62df)
It works perfectly fine. The custom header is properly set in `middleware.ts`. The server console confirms and the page shows the correct header.
With Next.js 13.4.13: [https://codesandbox.io/p/sandbox/with-next-13-4-13-7zh3kl](https://codesandbox.io/p/sandbox/with-next-13-4-13-7zh3kl)
The exact same code does not work anymore. The header is not set, as the server console and the page show.
### Describe the Bug
The code `middleware.ts` is straightforward:
```
export function middleware(request: NextRequest) {
const newHeaders = new Headers(request.headers);
newHeaders.set("x-header", "Some random header");
const newRequest = new NextRequest(request, { headers: newHeaders });
console.log(
"Retrieved x-header:",
newRequest.headers.get("x-header")
);
return NextResponse.next(newRequest);
}
```
With Next.js **13.4.12**, the console shows `Retrieved x-header: Some random header`, as expected.
With Next.js **13.4.13**, the console shows `Retrieved x-header: null`.
### Expected Behavior
With Next.js **13.4.13**, the console should show `Retrieved x-header: Some random header`, as it shows with Next.js **13.4.12**.
### Which browser are you using? (if relevant)
115.0.5790.171
### How are you deploying your application? (if relevant)
Vercel
<sub>[NEXT-1521](https://linear.app/vercel/issue/NEXT-1521/since-nextjs-13413-custom-headers-no-longer-can-be-set-in-middleware)</sub> | https://github.com/vercel/next.js/issues/54094 | https://github.com/vercel/next.js/pull/54108 | 96dd8ff4a505d7ea477c5283a6f7f7ea9be83aad | af97755e3c62a6b786b98b98ef8e91bf3d595957 | "2023-08-16T07:21:45Z" | javascript | "2023-08-16T18:54:35Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,093 | ["examples/with-docker/Dockerfile"] | NextJS v13.4.16 does not work in docker container | ### 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 Fri, 11 Aug 2023 11:03:36 +0000
Binaries:
Node: 18.16.0
npm: 9.5.1
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 13.4.16
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: N/A
Next.js Config:
output: standalone
```
### 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/vercel/next.js/blob/canary/examples/with-docker/README.md
### To Reproduce
- Follow the instructions here: https://github.com/vercel/next.js/blob/canary/examples/with-docker/README.md
- be sure you have Next v13.4.16
### Describe the Bug
Docker container with Next app starts but do not serve any content
### Expected Behavior
Docker container should start and serve application
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
Google Clound | https://github.com/vercel/next.js/issues/54093 | https://github.com/vercel/next.js/pull/54102 | a6415c62979db59fecc49086de8d7d241670f0dd | d60690e2bd799707256fa99d4ee0c24a3f372e4e | "2023-08-16T07:12:47Z" | javascript | "2023-08-16T10:08:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,057 | ["packages/next/src/build/webpack/loaders/next-metadata-route-loader.ts", "test/e2e/app-dir/metadata-dynamic-routes/app/route-config/sitemap.ts", "test/e2e/app-dir/metadata-dynamic-routes/index.test.ts"] | Sitemap is not updating when using dynamic sitemap with 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: darwin
Arch: arm64
Version: Darwin Kernel Version 22.6.0: Wed Jul 5 22:17:35 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8112
Binaries:
Node: 18.12.0
npm: 9.8.0
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.4.16
eslint-config-next: 13.4.16
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/KrustyC/thescrapbookers.blog
### To Reproduce
- deploy the website to Vercel
- visit `/sitemap.xml`
- make some code changes to the sitemap or publish a new article
- redeploy
- visit `/sitemap.xml` once again
### Describe the Bug
The sitemap never updates
### Expected Behavior
The sitemap should include the latest links
### Which browser are you using? (if relevant)
Chrome
### How are you deploying your application? (if relevant)
Vercel
<sub>[NEXT-1645](https://linear.app/vercel/issue/NEXT-1645/sitemap-is-not-updating-when-using-dynamic-sitemap-with-app-router)</sub> | https://github.com/vercel/next.js/issues/54057 | https://github.com/vercel/next.js/pull/56007 | ec9a87afd8c9752e1710427abd584a5b0da720f7 | 4a6319cd86344b8c195e1280aa8c271a2531fd0f | "2023-08-15T11:35:38Z" | javascript | "2023-09-26T17:04:58Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,055 | ["packages/next/src/server/app-render/app-render.tsx", "packages/next/src/server/app-render/required-scripts.tsx", "test/e2e/app-dir/app/index.test.ts"] | Missing nonce attribute in preinitialized scripts causing CSP violations 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: darwin
Arch: x64
Version: Darwin Kernel Version 19.6.0: Tue Jun 21 21:18:39 PDT 2022; root:xnu-6153.141.66~1/RELEASE_X86_64
Binaries:
Node: 20.3.0
npm: 9.6.7
Yarn: 3.6.0
pnpm: 8.6.10
Relevant Packages:
next: 13.4.16-canary.1
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Middleware / Edge (API routes, runtime)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/rinvii/missing-nonce
### To Reproduce
Set up a basic Next.js 13.4 App Router project.
1. Create a `middleware.ts` file in the root dir
```ts
import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";
// adding CSP to middleware example from https://nextjs.org/docs/app/building-your-application/routing/middleware#example
// This function can be marked `async` if using `await` inside
export function middleware(request: NextRequest) {
const requestHeaders = new Headers(request.headers);
let cspValue =
"default-src 'self'; " +
"frame-ancestors 'none'; " +
"form-action 'self'; " +
"base-uri 'self'; " +
"object-src 'none'; " +
"style-src 'self' 'unsafe-inline'; " +
`script-src 'self' 'unsafe-inline' https: http:${
process.env.NODE_ENV === "development" ? " 'unsafe-eval'" : ""
}`;
const nonce = crypto.randomUUID();
cspValue += ` 'nonce-${nonce}' 'strict-dynamic'`;
requestHeaders.set("content-security-policy", cspValue);
const response = NextResponse.next({
request: {
headers: requestHeaders,
},
});
response.headers.set("content-security-policy", cspValue);
return response;
}
// See "Matching Paths" below to learn more
export const config = {
matcher: "/:path*",
};
```
2. `npm run dev`
3. Observe CSP violations in the browser console log
### Describe the Bug
When implementing a strict Content Security Policy via middleware as described in https://github.com/vercel/next.js/issues/43743#issuecomment-1542684019, some script tags are missing a nonce value inside the head element.
I believe this bug was introduced in the PR https://github.com/vercel/next.js/pull/53705 where all but one of the required scripts for every page load are now currently preinitialized.
This seemed to have been resolved by the issues https://github.com/vercel/next.js/issues/43743 and https://github.com/vercel/next.js/issues/7486, but somehow reintroduced?
I noticed this when I was upgrading from 13.4.13 to 13.4.16. I managed to pinpoint this to 13.4.14-canary.2.
This happens both in dev and prod.
### Expected Behavior
Inline scripts injected into the page should have a nonce attribute when using nonce for the CSP `script-src` directive.
### 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/54055 | https://github.com/vercel/next.js/pull/54059 | f1c286fff2e03218b863e0b9ceff4dd7db2ca820 | 24cd55c09fc3676fd8eafcf66c174114fbc18362 | "2023-08-15T10:33:33Z" | javascript | "2023-08-20T13:55:02Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,054 | ["Cargo.lock", "Cargo.toml"] | Using this?.some throws ReferenceError: _this is not defined | ### 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: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 18.16.1
npm: 9.5.1
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.4.16
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
```
### 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/fstaffa/next-_this-bug-reproduction
### To Reproduce
Run next dev , and open the browser on http://localhost:3000
Next throws an exception
<img width="977" alt="image" src="https://github.com/vercel/next.js/assets/294522/f8a4b2cb-4fba-41cd-8a4b-74fe6828fb8b">
### Describe the Bug
This behavior started appearing with next 13.4.13 (worked fine on 13.4.12)
The class
```typescript
class Test
{
test() {
console.log(this?.some)
}
}
```
gets transpiled into
```javascript
class Test {
test() {
console.log(_this === null || _this === void 0 ? void 0 : _this.some);
}
}
```
which incorrectly uses _this instead of this (or at least declaring var _this = this).
### Expected Behavior
No error is thrown, compiler either declares __this_ variable or uses _this_ as is
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1518](https://linear.app/vercel/issue/NEXT-1518/using-thissome-throws-referenceerror-this-is-not-defined)</sub> | https://github.com/vercel/next.js/issues/54054 | https://github.com/vercel/next.js/pull/54082 | d60690e2bd799707256fa99d4ee0c24a3f372e4e | bc76784bcbe4debbf1fcbfbedaaccb11e53c3ef8 | "2023-08-15T10:23:54Z" | javascript | "2023-08-16T13:07:57Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 54,008 | ["packages/next/src/server/lib/router-utils/filesystem.ts", "test/e2e/dynamic-route-interpolation/index.test.ts", "test/e2e/dynamic-route-interpolation/pages/api/dynamic/[slug].js", "test/e2e/dynamic-route-interpolation/pages/blog/[slug].js"] | Dynamic routes cause a "ChunkLoadError" when using the app router in a dockerized Next.js 13 SPA | ### 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: #85-Ubuntu SMP Fri Jul 7 15:25:09 UTC 2023
Binaries:
Node: 18.15.0
npm: 9.5.0
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.4.15
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 Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/eide-1/sample-project
### To Reproduce
**Steps to Reproduce:**
1. Run the the project in a production environment by following the instructions in the README file
2. Click on the "Go to Dynamic Route" button. You will be presented with an application error
3. Right-click anywhere on the webpage and click "Inspect". The browser console will display the "ChunkLoadError"
### Describe the Bug
I am currently working on upgrading an existing Next.js SPA that uses the pages router to the app router. The project is deployed using Docker and Nginx. However, I noticed that dynamic routes cause a "ChunkLoadError" when the SPA is deployed in a production environment. All pages (including dynamic routes) are functional in a development environment.
The dynamic route in question uses the "use client" directive. I noticed that if I remove the "use client" directive and any component or hook that requires it from the page, I can get it to render properly in production mode.
I created a sample project that uses the same tech stack as my current SPA to demonstrate the issue and I included the steps to reproduce the issue below.
I also found the following Stack Overflow question detailing a similar issue to the one I described above: [In Next.js 13 using App Router, why can't I export dynamic routes with "use client"?](https://stackoverflow.com/questions/76824224/in-next-js-13-using-app-router-why-cant-i-export-dynamic-routes-with-use-clie)
### Expected Behavior
Dynamic routes should work in the production environment just like they used to under the pages router without causing a ChunkLoadError.
### Which browser are you using? (if relevant)
Microsoft Edge 115.0.1901.203 (64-bit)
### How are you deploying your application? (if relevant)
Docker/Nginx
<sub>[NEXT-1641](https://linear.app/vercel/issue/NEXT-1641/dynamic-routes-cause-a-chunkloaderror-when-using-the-app-router-in-a)</sub> | https://github.com/vercel/next.js/issues/54008 | https://github.com/vercel/next.js/pull/56187 | a2f9ef5a34418d562581f54353ed51491a019484 | 3172cfedc8b759fec89fda373c86b86931fc02f1 | "2023-08-14T17:59:34Z" | javascript | "2023-10-02T22:02:49Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,937 | ["docs/02-app/01-building-your-application/07-configuring/02-eslint.mdx"] | Docs: pnpm install commands incorrect | ### What is the improvement or update you wish to see?
I'd like to see the docs updated to reduce any friction the next person might have, and to leave the docs in a better state than when I found it.
### Is there any context that might help us understand?
When running the pnpm commands listed, it returns an error due to the non-existent option.
```
❯ pnpm add --dev @next/eslint-plugin-next
ERROR Unknown option: 'dev'
For help, run: pnpm help add
```
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/pages/building-your-application/configuring/eslint | https://github.com/vercel/next.js/issues/53937 | https://github.com/vercel/next.js/pull/53938 | e0ca2ba544b562bf718afadbc75db1885cb41504 | ea0bb97729c8a46747647de37ba9edff3de16c24 | "2023-08-12T06:27:04Z" | javascript | "2023-08-12T07:52:46Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,911 | ["packages/next/src/client/components/router-reducer/reducers/server-action-reducer.ts", "test/e2e/app-dir/actions/app-action.test.ts", "test/e2e/app-dir/actions/app/header/ui.js"] | [Routing] Using redirect from server action always uses "replace" redirect type | ### 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: 16.15.1
npm: 8.11.0
Yarn: 1.22.19
pnpm: 8.6.11
Relevant Packages:
next: 13.4.14-canary.2
eslint-config-next: 13.4.13
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### 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 or a replay of the bug
https://github.com/joshfullmer/redirect-test
### To Reproduce
Setup:
- Have two pages (A and B)
- Have server action that redirects to Page B, including the `RedirectType.push` option.
- Page A implements a form that uses the server action with a button to submit the form
Steps:
- Open new tab/window with clear browser history
- Visit Page A
- Click button in form
Expected:
- Page A should be in the browser history
- Clicking the browser's back button navigates from Page B to Page A
Actual:
- Browser history is replaced, only Page B exists in the browser history
- Clicking the browser's back button does nothing
### Describe the Bug
When using the `redirect` function from `next/navigation` in a server function, the redirect type is always "replace".
The [docs](https://nextjs.org/docs/app/api-reference/functions/redirect#parameters) say that "push" is the default value for redirect type in the `redirect` function when used in server actions, but that does not appear to happen. The current route always appears to be replaced, even when the redirect type is explicitly `RedirectType.push`.
### Expected Behavior
When `redirect` is used within a server action, the default value for redirect type of "push" should be respected, and browser history should include the previous page.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1551](https://linear.app/vercel/issue/NEXT-1551/[routing]-using-redirect-from-server-action-always-uses-replace)</sub> | https://github.com/vercel/next.js/issues/53911 | https://github.com/vercel/next.js/pull/54458 | 0621171f0ba6008ce69fd34d54b14879befcc9ac | 758b9d251ab0a452436421c301460ae2f8bb854b | "2023-08-11T14:44:11Z" | javascript | "2023-08-23T19:47:46Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,910 | ["docs/02-app/01-building-your-application/02-data-fetching/03-server-actions.mdx"] | Docs: Bug in the code sample for server actions in client component. | ### What is the improvement or update you wish to see?

[Here](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#with-client-components) it states that we cant define actions directly inside a client component. but the code does the exact opposite.
one possible fix is:-
```
export async function action(propAction){
await propAction
}
```
and import this in app/components/example-client-component.js and change:-
```
<form action={action(updateItem)}>
<input type="text" name="name" />
<button type="submit">Update Item</button>
</form>
```
If this looks good i can raise a pr for it.
### Is there any context that might help us understand?
Server actions when passing action as a prop to child client component
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#props | https://github.com/vercel/next.js/issues/53910 | https://github.com/vercel/next.js/pull/53920 | fe80aff6dcde7a1e8224724ac1a524fb2372c19c | 10cb74062bd5c444f58b4156e45d381a0e4d75e2 | "2023-08-11T14:36:44Z" | javascript | "2023-08-11T18:25:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,887 | ["packages/next/src/server/lib/router-utils/setup-dev.ts", "test/integration/dynamic-routing/pages/[name]/[comment]/[...rest].js", "test/integration/dynamic-routing/test/index.test.js"] | Catch-all route takes precedence over dynamic routes when navigating with next/link | ### 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:44 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T8103
Binaries:
Node: 18.16.0
npm: 9.5.1
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 13.4.14-canary.1
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
```
### 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 or a replay of the bug
https://github.com/clueleaf/next-catch-all-route-reproduction
### To Reproduce
1. Start the Next app with dev mode
> yarn dev
2. Open the root page
> http://localhost:3000/
3. Click the `Post 1` link (http://localhost:3000/posts/1)
4. The page returns 404 even though `/posts/[id]/index.tsx` file exists under `/pages` folder
5. If you reload, `Post 1` page loads successfully
### Describe the Bug
This happens when a catch-all route (`[...rest].tsx`) is defined and `getServerSideProps` is used in both the catch-all route and the destination dynamic route (`/posts/[id]/index.tsx`).
I'm using catch-all route in order to redirect any routes to the sign in page if the user doesn't have a session. If the user has the session, catch-all route returns 404 because the user should know that the page doesn't exist.
(In the reproduction repo, the sign in page is not included and catch-all route always returns 404, assuming the user is already signed in).
```ts
// /pages/[...rest].tsx
export const getServerSideProps: GetServerSideProps = async (context) => {
// const session = ...
// if (!session) {
// return { redirect: { destination: `/signin?callback=${context.resolvedUrl}`, permanent: false } };
// }
return { notFound: true };
};
```
When navigating to a dynamic routes using Next `Link` component, somehow this catch-all route is triggered and 404 is returned even though the route exists.
Here is the `getServerSideProps` func in the dynamic route.
```ts
// /pages/posts/[id]/index.tsx
export const getServerSideProps: GetServerSideProps = async (context) => {
// const session = ...
// if (!session) {
// return { redirect: { destination: `/signin?callback=${context.resolvedUrl}`, permanent: false } };
// }
// return { props: { session } };
return { props: {} };
};
```
One of the following actions fixes this bug, but makes it difficult to redirect anonymous users to the login page.
* Remove `/pages/[...rest].tsx` completely
* Remove `getServerSideProps` in `/pages/[...rest].tsx`
* Remove `getServerSideProps` in `/pages/posts/[id]/index.tsx`
It seems like this bug happens from v13.4.13, and only in dev mode.
### Expected Behavior
404 is not returned when navigating to a dynamic route with `Link` component.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1535](https://linear.app/vercel/issue/NEXT-1535/catch-all-route-takes-precedence-over-dynamic-routes-when-navigating)</sub> | https://github.com/vercel/next.js/issues/53887 | https://github.com/vercel/next.js/pull/54364 | 705b2ef2d4eb504aca5d7b9e015479fcaad1b624 | c89f97ea56182af23f4ad7e215a8c33224094fd8 | "2023-08-11T02:31:51Z" | javascript | "2023-08-22T17:19:54Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,822 | ["packages/next/src/server/lib/server-ipc/utils.ts", "test/production/ipc-forbidden-headers/app/api/app-api/route.ts", "test/production/ipc-forbidden-headers/ipc-forbidden-headers.test.ts", "test/production/ipc-forbidden-headers/pages/api/pages-api.js"] | Expect header not supported on API route POST requests after switch to undici | ### 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.16.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.4.13
eslint-config-next: 13.4.13
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.5
Next.js Config:
output: N/A
```
### 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/suspicious-fermat-dg7pkp
### To Reproduce
Send a POST request to https://dg7pkp-3000.csb.app/api/foo which includes the [Expect](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expect) header (`Expect: 100-continue`).
### Describe the Bug
Starting from [email protected] POST requests to (Pages-based) API routes with an Expect header fail with an error:

Using [email protected] the issue is not reproducible.
The Expect header is apparently [automatically sent by .NET](https://learn.microsoft.com/en-us/dotnet/api/system.net.servicepointmanager.expect100continue?view=net-7.0). We are simultaneously looking into disabling this in the .NET client making these particular requests.
**Here are notes from a colleague's investigation into this...**
You have an internal invoke-request file that executes internal server side fetch call when API route is triggered by POST request
Before <13.4.13 you used node fetch: https://github.com/vercel/next.js/blob/v13.4.12/packages/next/src/server/lib/server-ipc/invoke-request.ts#L4
In scope of 13.4.13 you removed node fetch and started to use [undici](https://github.com/nodejs/undici): https://github.com/vercel/next.js/blob/canary/packages/next/src/server/lib/server-ipc/invoke-request.ts#L27
undici doesn't support this header, so it's a breaking change for us, see: https://github.com/nodejs/undici/blob/main/lib/core/request.js#L354
Here is a PR where you made these changes: [https://github.com/vercel/next.js/commit/1398de9977b89c9c4717d26e213b52bc63ccbe7e#diff-52cd95be25b76891bc705a2b49[…]530283792dd37f6bbd332feb4255ab1f](https://github.com/vercel/next.js/commit/1398de9977b89c9c4717d26e213b52bc63ccbe7e#diff-52cd95be25b76891bc705a2b498cbd25530283792dd37f6bbd332feb4255ab1f)
Here is a PR where you mentioned migration to undici: https://github.com/vercel/next.js/pull/53548
### Expected Behavior
Expect header is supported.
### 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/53822 | https://github.com/vercel/next.js/pull/53947 | 2b38118ea005c1bf6bc4059534754080cef7af54 | 23f623546ec82f1257381f69a91e58f5b2776041 | "2023-08-09T21:03:26Z" | javascript | "2023-08-12T19:38:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,787 | ["docs/02-app/01-building-your-application/01-routing/09-intercepting-routes.mdx"] | Docs: Description in intercepting routes is misleading. | ### What is the improvement or update you wish to see?

This part is kind of misleading, If i click on a feed item the intercepting route is /photos segment not the /feed. If i am wrong why the /feed is intercepted to show /photos/:id, it should intercept from the current context isn't it? I think the documentation needs an update around this and simplify the use of word 'intercept'.
### Is there any context that might help us understand?
Documentation regarding intercepting routes
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/building-your-application/routing/intercepting-routes
<sub>[DX-1891](https://linear.app/vercel/issue/DX-1891/docs-description-in-intercepting-routes-is-misleading)</sub> | https://github.com/vercel/next.js/issues/53787 | https://github.com/vercel/next.js/pull/53854 | 45576ae752a07f48ddfa6a407b59aab14954a3b7 | 1cafeb41022b1a6a15eddef908b0d843451f1b01 | "2023-08-09T09:47:34Z" | javascript | "2023-08-11T08:59:03Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,732 | ["packages/next/src/build/webpack/plugins/next-types-plugin/index.ts", "packages/next/src/client/link.tsx", "packages/next/types/index.d.ts"] | typedRoutes: type overrides generated in .next, gitignored, tsc unreliable in CI | ### 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.6.0: Wed Jul 5 22:17:35 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8112
Binaries:
Node: 18.16.0
npm: 9.5.1
Yarn: N/A
pnpm: 8.6.2
Relevant packages:
next: 13.4.7-canary.4
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)
Routing (next/router, next/navigation, next/link), TypeScript (plugin, built-in types)
### Link to the code that reproduces this issue or a replay of the bug
any nextjs app will be this way
### To Reproduce
- make a nextjs app
- add `typedRoutes`
- add code that uses the types generated by `typedRoutes` directly
- make a CI job that runs `tsc` without first running a dev server
- typechecking fails since e.g. `LinkProps` doesn't have a generic (it doesn't if you aren't using `typedRoutes`, but if you are then it does
### Describe the Bug
Types are missingtypedRoutes generated a `.next/types/link.d.ts` file that overrides the builtin `next/link` types. But `.next` is in `.gitignore` by default, and if you typecheck your code in CI using `tsc` directly, then it is likely to not be there at that time. So then the types are missing and then typechecking fails.
### Expected Behavior
one of two things:
- a way to generate the types by a `next` command outside of the dev server
- not gitignoring the types by default
### 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/53732 | https://github.com/vercel/next.js/pull/54226 | ec438418a437068f104f8f7892abe2fb3e2b7988 | b25407e4e4b7dc437a77f93b13ed3f28d66a2b69 | "2023-08-08T13:26:17Z" | javascript | "2023-08-18T14:41:21Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,723 | ["Cargo.lock", "Cargo.toml"] | Minifier too agressive deletes used code | ### 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: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 18.16.0
npm: 9.5.1
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 13.4.14-canary.0
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)
SWC minifier (swcMinify: true), SWC transpilation
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/santialbo/next-swc-issue
### To Reproduce
Create a basic next app
```
npx create-next-app@latest nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/master/basics/learn-starter"
```
Create a `/pages` component like the following
```ts
export default function Home() {
return (
<div>{foo.a}</div>
)
}
const foo = {
get a() {
return `a ${this.b}`;
},
get b() {
return `b`;
}
}
```
Run `yarn build` and inspect `.next/chunks/pages/{chunk of the used page}`, the following will be generated:
```
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{5557:function(n,t,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return u(6616)}])},6616:function(n,t,u){"use strict";u.r(t),u.d(t,{default:function(){return r}});var e=u(5893);function r(){return(0,e.jsx)("div",{children:c.a})}let c={get a(){return"a ".concat(this.b)}}}},function(n){n.O(0,[774,888,179],function(){return n(n.s=5557)}),_N_E=n.O()}]);
```
The previous `foo` object gets compiled into
```
let c={get a(){return"a ".concat(this.b)}}
```
Notice property `get b` is missing! The resulting string is `a undefined` instead of `a b`;
### Describe the Bug
The minifier is too agressive eliminating dead code which is not actually dead.
I noticed this error in my codebase when I upgraded from `13.4.9` to `13.4.13`
### Expected Behavior
Don't delete actually used property.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1502](https://linear.app/vercel/issue/NEXT-1502/minifier-too-agressive-deletes-used-code)</sub> | https://github.com/vercel/next.js/issues/53723 | https://github.com/vercel/next.js/pull/53831 | ddc8f50d247b81388c69e207fcf41422350f2464 | c8020758278baeb1a538a70258854b984cb61bd6 | "2023-08-08T10:31:11Z" | javascript | "2023-08-11T22:38:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,695 | ["packages/next/src/build/index.ts", "packages/next/src/server/config-schema.ts", "packages/next/src/server/config-shared.ts", "test/e2e/app-dir/app-fetch-deduping/app-fetch-deduping.test.ts"] | build will yield "Failed to set fetch cache" | ### 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.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000
Binaries:
Node: 18.17.0
npm: 9.8.1
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.4.13
eslint-config-next: 13.4.13
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
Data fetching (gS(S)P, getInitialProps)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/vercel/next.js/
### To Reproduce
"npm run build" with 13.4.13 will yield "Failed to set fetch cache" for some fetch calls.
the same code works fine in 13.4.12.
### Describe the Bug
"npm run build" with 13.4.13 will yield "Failed to set fetch cache" for some fetch calls.
the same code works fine in 13.4.12.
### Expected Behavior
should be the same as in 13.4.12
### 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/53695 | https://github.com/vercel/next.js/pull/57943 | ad55d781991bd7d69ca8de0111a4b792fba32d84 | 5da8ad7baf3f767e3c26286c3778cb0d705fb033 | "2023-08-07T19:55:15Z" | javascript | "2023-11-02T20:26:55Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,682 | ["packages/next/src/server/server-utils.ts", "packages/next/src/server/web-server.ts", "test/e2e/app-dir/app/index.test.ts"] | Catch-all Params Encoding on the Edge Runtime | ### 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.4.0
npm: 8.12.1
Yarn: 1.22.19
pnpm: 8.6.3
Relevant Packages:
next: 13.4.13-canary.6
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/simonecervini/nextjs-issue-with-catch-all
### To Reproduce
1. Clone the repo
2. Deploy on Vercel and follow the instructions below. You have to try both locally and in production because you don't get the same results
### Describe the Bug
### Test case
URL: http://localhost:3000/a/b/c
Expected output: `{"params":{"singleParam":"a","slug":["b","c"]},"searchParams":{}}`
### Results:
- Local output (pnpm dev): `{"params":{"singleParam":"a","slug":["b","c"]},"searchParams":{"singleParam":"a","slug":["b","c"]}}` ✅
- Local output (pnpm start): `{"params":{"singleParam":"a","slug":["b","c"]},"searchParams":{"singleParam":"a","slug":["b","c"]}}` ✅
- Production output (Vercel): `{"params":{"singleParam":"a","slug":["b%2Fc"]},"searchParams":{"singleParam":"a","slug":["b/c"]}}` ❌
### Expected Behavior
As written in the "Describe the bug" section, in the last case instead of `slug: ["b%2Fc"]` you should get `slug: ["b", "c"]`
### 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/53682 | https://github.com/vercel/next.js/pull/58949 | 40cb6f4eb911ae2b2e7c25c850b79081098ca033 | faa44210340d2ef19da6252e40a9b3e66f214637 | "2023-08-07T14:31:58Z" | javascript | "2023-12-05T08:43:32Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,654 | ["packages/next/src/client/components/router-reducer/reducers/server-action-reducer.ts", "test/e2e/app-dir/actions/app-action.test.ts"] | Search parameters with Unicode characters cause server actions 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.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: N/A
pnpm: 8.6.12
Relevant Packages:
next: 13.4.13-canary.18
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/nishitaniyuki/server-actions-search-params-unicode
### To Reproduce
https://github.com/nishitaniyuki/server-actions-search-params-unicode#search-parameters-with-unicode-characters-cause-server-actions-to-fail
1. Clone above repo
2. Run `npm run dev`
3. Visit http://localhost:3000/?q=%E3%81%82%E3%81%82%E3%81%82
4. Click the count up button
### Describe the Bug
Error when executing server action with unicode string “あああ" as search parameter
The following message will be displayed: "Unhandled Runtime Error" The specific message may vary depending on the browser:
- Google Chrome: `TypeError: Failed to execute 'fetch' on 'Window': Failed to read the 'headers' property from 'RequestInit': String contains non ISO-8859-1 code point.`
- Firefox: `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
server actions are successfully performed.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Related Issues
- #48728
| https://github.com/vercel/next.js/issues/53654 | https://github.com/vercel/next.js/pull/53655 | 78b04980bea2678652c58ba901966892c9c40aab | b993afbf7c6be786a1b9c37ff05c3e19602679ab | "2023-08-07T06:15:26Z" | javascript | "2023-08-07T10:02:48Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,614 | ["packages/next/src/build/entries.ts", "packages/next/src/lib/is-internal-component.ts", "packages/next/src/server/dev/hot-reloader-webpack.ts", "test/development/pages-dir/custom-app-hmr/index.test.ts", "test/development/pages-dir/custom-app-hmr/pages/_app.js", "test/development/pages-dir/custom-app-hmr/pages/index.js"] | Hot Reload Full Refresh in v13.4.8 | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```bash
Next.js v13.4.8 with pages directory routing & Tailwind:
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64
Binaries:
Node: 16.18.1
npm: 9.3.1
Yarn: 1.22.19
pnpm: 7.5.0
Relevant Packages:
next: 13.4.8
eslint-config-next: 13.4.8
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### 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/frankfka/nextjs-full-refresh-bug
### To Reproduce
See README in https://github.com/frankfka/nextjs-full-refresh-bug
### Describe the Bug
We noticed in our production app that an upgrade from v13.4.7 -> v13.4.8 breaks hot reload in our dialog components (we use [Radix Dialogs](https://www.radix-ui.com/docs/primitives/components/dialog)). Hot reload still works in normal pages, but will trigger a full refresh if a dialog component is edited.
I see a number of updates to hot reload in 13.4.8, perhaps one of them could have triggered this change?
### Expected Behavior
Hot reload works when editing dialog components
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1568](https://linear.app/vercel/issue/NEXT-1568/hot-reload-full-refresh-in-v1348)</sub> | https://github.com/vercel/next.js/issues/53614 | https://github.com/vercel/next.js/pull/54690 | 8405a1a2c363d082f0b198816fc30ee5f7c14855 | ba0472c507baeffd3bca771d4fd86b61d7a2354d | "2023-08-05T17:16:45Z" | javascript | "2023-08-30T10:44:08Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,574 | ["test/integration/next-image-new/app-dir/app/static-img/page.js", "test/integration/next-image-new/app-dir/test/static.test.ts", "test/integration/next-image-new/base-path/pages/static-img.js", "test/integration/next-image-new/base-path/test/static.test.js", "test/integration/next-image-new/default/pages/static-img.js", "test/integration/next-image-new/default/test/static.test.ts"] | `next/image` with `priority` in App Router causes double fetch on mobile | ### 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: Thu Jun 8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103
Binaries:
Node: 16.20.0
npm: 8.19.4
Yarn: 1.22.19
pnpm: 8.6.0
Relevant Packages:
next: 13.4.13-canary.14
eslint-config-next: 13.4.11
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
Image optimization (next/image, next/legacy/image)
### Link to the code that reproduces this issue or a replay of the bug
Link to the code that reproduces this issue or a replay of the bug
https://github.com/gauravsaini964/image-preload-next13
### To Reproduce
- Build the repo.
- Navigate to index page (which is using app-dir) and inspect network tab.
- Preload image is loaded twice of different resolution.
- Navigate to /page-dir (which is using page dir).
- Correct image is preloaded only once.
Generated preload tag
```html
<link rel="preload" as="image" fetchpriority="high" imagesrcset="https://staging.nathabit.in/_nat/images/face_malai_mobile_4c3ebeef79.jpg?format=auto&width=640&quality=75 640w, https://staging.nathabit.in/_nat/images/face_malai_mobile_4c3ebeef79.jpg?format=auto&width=750&quality=75 750w, https://staging.nathabit.in/_nat/images/face_malai_mobile_4c3ebeef79.jpg?format=auto&width=828&quality=75 828w, https://staging.nathabit.in/_nat/images/face_malai_mobile_4c3ebeef79.jpg?format=auto&width=1080&quality=75 1080w, https://staging.nathabit.in/_nat/images/face_malai_mobile_4c3ebeef79.jpg?format=auto&width=1200&quality=75 1200w, https://staging.nathabit.in/_nat/images/face_malai_mobile_4c3ebeef79.jpg?format=auto&width=1920&quality=75 1920w, https://staging.nathabit.in/_nat/images/face_malai_mobile_4c3ebeef79.jpg?format=auto&width=2048&quality=75 2048w, https://staging.nathabit.in/_nat/images/face_malai_mobile_4c3ebeef79.jpg?format=auto&width=3840&quality=75 3840w" imagesizes="80vw">
```
<img width="1680" alt="Screenshot 2023-08-04 at 5 11 20 PM" src="https://github.com/vercel/next.js/assets/16620277/3364a6ae-ecb6-4dc4-b475-a93555870755">
<img width="1680" alt="Screenshot 2023-08-04 at 5 11 43 PM" src="https://github.com/vercel/next.js/assets/16620277/01836c2d-1062-49f3-89dc-08ba84a52b79">
<img width="1322" alt="Screenshot 2023-08-04 at 5 10 45 PM" src="https://github.com/vercel/next.js/assets/16620277/f39b8a39-4d1c-4615-a980-41e174cd5689">
### Describe the Bug
I have 10 banners on a page.
Only 1st banner is LCP image hence I set priority=true on that banner.
Preload tag is generated and image is fetched of ~600-800px width which is correct size. But the image is fetched again of higher resolution immediately and this higher resolution image is rendered. Effectively negating the presence of preload tag.
This only happens in first banner.
On the remaining 9 banners, priority=false, lower and correct resolution image is used. Resolution is equal to the one fetched in preload tag.
### Expected Behavior
Only one LCP image should be fetched and rendered.
### Which browser are you using? (if relevant)
Chrome
### How are you deploying your application? (if relevant)
Vercel
<sub>[NEXT-1497](https://linear.app/vercel/issue/NEXT-1497/nextimages-when-using-priority=true-fetching-same-images-twice-of-two)</sub> | https://github.com/vercel/next.js/issues/53574 | https://github.com/vercel/next.js/pull/53700 | f0dab3a8dad3acae2d25e659c941cade33248c3d | 195d1f1a2b6dc794ca9b84be318c90b47f44a85a | "2023-08-04T11:48:53Z" | javascript | "2023-08-08T21:02:54Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,569 | ["packages/next/src/build/webpack/loaders/next-app-loader.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel/(new)/@baz/default.js", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel/@bar/default.js", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel/@bar/nested/page.js", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel/@foo/default.js", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel/@foo/nested/page.js", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel/layout.js", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"] | Missing page_client-reference-manifest.js files on build (using path grouping) | ### 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.13-canary.13
eslint-config-next: 13.2.4
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.5
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/nextjs-missing-manifest-rtgf6d
### To Reproduce
The error occurs when you try to build the application for the first time (when no .next folder exists).
Just running `npm run build` will produce the following output:
```
➜ workspace git:(master) ✗ npm run build
> [email protected] build
> next build
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
- info Creating an optimized production build
- info Compiled successfully
- info Linting and checking validity of types .Pages directory cannot be found at /project/home/nickman87/workspace/pages or /project/home/nickman87/workspace/src/pages. If using a custom path, please configure with the `no-html-link-for-pages` rule in your eslint config file.
- info Linting and checking validity of types
- info Collecting page data ...Error: Cannot find module '/project/home/nickman87/workspace/.next/server/app/(logged-in)/page_client-reference-manifest.js'
Require stack:
- /project/home/nickman87/workspace/node_modules/next/dist/server/load-components.js
- /project/home/nickman87/workspace/node_modules/next/dist/build/utils.js
- /project/home/nickman87/workspace/node_modules/next/dist/build/worker.js
- /project/home/nickman87/workspace/node_modules/next/dist/compiled/jest-worker/processChild.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
at /project/home/nickman87/workspace/node_modules/next/dist/server/require-hook.js:110:36
at Function.Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1028:19)
at require (node:internal/modules/cjs/helpers:102:18)
at loadJSManifest (/project/home/nickman87/workspace/node_modules/next/dist/server/load-components.js:64:72)
at loadComponentsImpl (/project/home/nickman87/workspace/node_modules/next/dist/server/load-components.js:86:29)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /project/home/nickman87/workspace/node_modules/next/dist/build/utils.js:1006:32
at async Span.traceAsyncFn (/project/home/nickman87/workspace/node_modules/next/dist/trace/trace.js:103:20) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/project/home/nickman87/workspace/node_modules/next/dist/server/load-components.js',
'/project/home/nickman87/workspace/node_modules/next/dist/build/utils.js',
'/project/home/nickman87/workspace/node_modules/next/dist/build/worker.js',
'/project/home/nickman87/workspace/node_modules/next/dist/compiled/jest-worker/processChild.js'
]
}
> Build error occurred
Error: Failed to collect page data for /
at /project/home/nickman87/workspace/node_modules/next/dist/build/utils.js:1156:15
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
type: 'Error'
}
- info Collecting page data .
```
### Describe the Bug
The build will generate the necessary file `page_client-reference-manifest.js` for the `(logged-out)` group, but not for the `(logged-in)` group folder.
This causes a one-time error during build, in subsequent builds the error does not seem to appear anymore, as well as a missing module error during runtime (as the file is loaded, but does not exist).
The issue appears starting 13.4.10, but it is not shown at compile time, only at runtime.
### Expected Behavior
All necessary files should be generated on build time.
### Which browser are you using? (if relevant)
Chrome, but not relevant
### How are you deploying your application? (if relevant)
Netlify, but the issue also arises locally | https://github.com/vercel/next.js/issues/53569 | https://github.com/vercel/next.js/pull/53752 | 5cfb936edd154ebc107e0d3da47a9828b422b3e0 | d58fd68f0ac335b27dd6e0e79fe6664b0256e2b7 | "2023-08-04T09:33:22Z" | javascript | "2023-08-08T22:56:39Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,460 | ["docs/02-app/01-building-your-application/04-caching/index.mdx"] | Docs: Broken image in new Caching docs | ### What is the improvement or update you wish to see?
The Caching in Next.js docs page has been recently updated. While reading through the new material I noticed a broken image in the `Static and Dynamic Rendering` section
<img width="1792" alt="Screenshot 2023-08-01 at 22 24 43" src="https://github.com/vercel/next.js/assets/92527147/9fe59719-23c4-4b36-9d3c-e9e86f33e081">
### Is there any context that might help us understand?
The origin images return a 500 error (not sure why it's a 500 and not a 404). Both of these return 500 errors:
- `/docs/dark/static-and-dynamic-routes.png`
- `/docs/light/static-and-dynamic-routes.png`
Source code looked fine, it's just that these links (and `/_next/image` calls as well) are broken
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/building-your-application/caching#static-and-dynamic-rendering
<sub>[DX-1842](https://linear.app/vercel/issue/DX-1842/docs-broken-image-in-new-caching-docs)</sub> | https://github.com/vercel/next.js/issues/53460 | https://github.com/vercel/next.js/pull/53478 | b31b0ee0cceeb68c01363cb1adb95ea8041c9974 | eecd8dc146c746fe17905becee49df5019d54986 | "2023-08-01T20:34:40Z" | javascript | "2023-08-02T12:11:22Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,448 | ["packages/next/src/build/analysis/get-page-static-info.ts", "test/e2e/app-dir/app-edge/app-edge.test.ts", "test/e2e/app-dir/app-edge/app/export/basic/page.tsx", "test/e2e/app-dir/app-edge/app/export/inherit/page.tsx"] | Next.js should warn the user when a page re-exports `runtime` and `preferredRegion` from another module | ### 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: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 16.14.0
npm: 8.12.1
Yarn: 1.22.19
pnpm: 7.29.0
Relevant Packages:
next: 13.4.13-canary.8
eslint-config-next: 13.4.12
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/agadzik/next-warn-config-exports
### To Reproduce
- Define a page with the following exports
```tsx
export { default, runtime, preferredRegion } from "../basic/page";
```
- Build the app with `next build`
- Run the app with `next start`
- Verify that `/exports/inherit` renders `Node!`
### Describe the Bug
No warning message during `next dev` or `next build` that tells the user that their page config is incorrect.
### Expected Behavior
Next.js should warn the user at dev time when their page config is incorrect. In this case, when trying to re-export `runtime` and or `preferredRegion` the user should be warned that the system could not statically analyze the values and therefore the defaults values will be used.
### Which browser are you using? (if relevant)
Chrome 115.0.5790.114
### How are you deploying your application? (if relevant)
Vercel | https://github.com/vercel/next.js/issues/53448 | https://github.com/vercel/next.js/pull/53449 | 079813c11c8afcbabc165dec144704f560613c82 | 9bde7dcc0f8c73f5785ec6e0efd8e59e7a7c4c4b | "2023-08-01T15:39:22Z" | javascript | "2023-08-01T20:59:20Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,367 | ["packages/next/src/server/lib/router-server.ts", "packages/next/src/server/lib/server-ipc/index.ts", "test/production/standalone-mode/required-server-files/pages/api/env.js", "test/production/standalone-mode/required-server-files/required-server-files.test.ts"] | Custom process.env variables not available in docker 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: arm64
Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:21:34 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8112
Binaries:
Node: 18.16.0
npm: 9.6.7
Yarn: 1.22.19
pnpm: 8.6.2
Relevant Packages:
next: 13.4.13-canary.0
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: N/A
Next.js Config:
output: standalone
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Operating System (Windows, MacOS, Linux), Standalone mode (output: "standalone")
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/florianliebig/nextjs-error-docker-13.4.13
### To Reproduce
# Steps to reproduce
```sh
docker build -t next-test --no-cache . && docker run -p 3000:3000 --env API_BASE=https://www.google.com --name next-test next-test
```
Visit any page, check for API_BASE in Node terminal. process.env is console.logged in middleware.ts. API_BASE will not be available in process.env
Downgrade next in package.json to 13.4.12. Run npm i and rerun the commands above. API_BASE will be available.
Also see readme of my repository: https://github.com/florianliebig/nextjs-error-docker-13.4.13
### Describe the Bug
I am using the default docker setup with middleware in app dir. I am defining environment variables using docker context, not .env file.
Beginning from 13.4.13-canary.0 only a few next internal environment variables are available in that position
### Expected Behavior
All node & docker context environment variables are available at that position
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
docker with OrbStack
<sub>[NEXT-1508](https://linear.app/vercel/issue/NEXT-1508/custom-processenv-variables-not-available-in-docker-standalone-output)</sub> | https://github.com/vercel/next.js/issues/53367 | https://github.com/vercel/next.js/pull/54203 | 819a163fce97a4267383c8eb6521f6d574c36b1f | 803bbe5c9388bb9b5af3b75ba6f1a76332e74112 | "2023-07-31T08:03:27Z" | javascript | "2023-08-18T14:04:48Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,347 | ["packages/next/src/client/components/app-router.tsx", "test/lib/browsers/base.ts", "test/lib/browsers/playwright.ts", "test/lib/browsers/selenium.ts", "test/lib/next-webdriver.ts", "test/production/export-routing/app/layout.js", "test/production/export-routing/app/page.js", "test/production/export-routing/index.test.ts", "test/production/export-routing/next.config.js"] | `replaceState` on scroll after visiting external site | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```bash
npx --no-install next info
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:23 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6020
Binaries:
Node: 20.3.1
npm: 9.6.7
Yarn: N/A
pnpm: 8.6.5
Relevant Packages:
next: 13.4.13-canary.6
eslint-config-next: 13.4.6
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Routing (next/router, next/navigation, next/link)
### Link to the code that reproduces this issue or a replay of the bug
https://bright.codehike.org
### To Reproduce
I haven't been able to create a minimal reproduction on Stackblitz yet, but I'm observing this issue on multiple public Next.js sites so I thought I'd report it anyway.
# Example 1 – bright
1. Go to https://bright.codehike.org
2. Click the ["the Next.js docs" link](https://nextjs.org/docs/app/building-your-application/configuring/mdx)
3. Click Back button
4. Scroll around on the page. If nothing happens, mouse over the "recipes" link.
5. Either the scrolling around OR mousing over the recipes link will trigger a navigation back to the "the Next.js docs"
6. Clicking "Back" will NOT take you back to bright.codehike.org, as it appears the navigation was a `replaceState` and your history is now busted.
## Video Demo:
https://github.com/vercel/next.js/assets/1009/09788191-ee28-4123-b1af-d2faa17b260c
# Example 2 – my personal site
1. Go to https://alan.norbauer.com/articles/bookcision
2. Click the ["View this article's source code" link](https://github.com/altano/alan.norbauer.com/tree/main/src/content/articles/bookcision/index.mdx) which links to github
3. Click Back button
4. Scroll around on the page.
5. Scrolling around will trigger a navigation back to github
6. Clicking "Back" will NOT take you back to my site, as it appears the navigation was a `replaceState` and your history is now busted.
## Video Demo:
https://github.com/vercel/next.js/assets/1009/1714b018-fcac-4c53-b077-6f73997ed94e
### Describe the Bug
Here's what I can gather:
1. Navigating to an external site is key to triggering the issue.
2. I can reproduce the issue on desktop Chrome and mobile Safari
3. These are pretty basic Next.js sites. Bright's source is [here](https://github.com/code-hike/bright/tree/bb61dada0f95cd077ebeda37722a52095757f6d0/web) and my site's source is [here](https://github.com/altano/alan.norbauer.com).
4. I _CANNOT_ reproduce this with the devtools open, making debugging extremely difficult.
5. This reproduces in both dev mode and production deploys.
6. [This](https://stackblitz.com/edit/stackblitz-starters-8nfdhk?file=src%2Fapp%2Fpage.tsx) is my unsuccessful attempt to reproduce in stackblitz
7. In mobile Safari I'm more likely to get stuck in a loop where scrolling isn't even required to trigger the erroneous navigation. When I hit back it immediately shoves me forward. I can keep hitting back and my personal site will flash before I'm navigated back to github, stuck there:
https://github.com/vercel/next.js/assets/1009/7f7227eb-ea92-4c84-ae4a-74422a599a6f
### Expected Behavior
I would not expect scrolling to trigger a history `replaceState` or any navigation at all.
### Which browser are you using? (if relevant)
Chrome 115.0.5790.114 (arm64)
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1511](https://linear.app/vercel/issue/NEXT-1511/replacestate-on-scroll-after-visiting-external-site)</sub> | https://github.com/vercel/next.js/issues/53347 | https://github.com/vercel/next.js/pull/54081 | 86d2ead1fe612432f7aee73f295a3753bd421ebe | 0b3e366f3212dcf7d35ed86da60a8422e1a4836a | "2023-07-30T08:05:34Z" | javascript | "2023-08-16T17:55:06Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,315 | ["packages/next/src/client/components/app-router-announcer.tsx", "packages/next/src/server/config-schema.ts", "packages/next/src/server/config-shared.ts", "test/development/app-dir/strict-mode-enabled-by-default/app/layout.js", "test/development/app-dir/strict-mode-enabled-by-default/app/page.js", "test/development/app-dir/strict-mode-enabled-by-default/strict-mode-enabled-by-default.test.ts"] | React Strict Mode is not enabled by default for App Router apps | ### 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: Thu Jun 8 23:57:12 PDT 2023; root:xnu-8020.240.18.701.6~1/RELEASE_X86_64
Binaries:
Node: 20.3.0
npm: 9.6.7
Yarn: 1.22.19
pnpm: 8.6.6
Relevant Packages:
next: 13.4.13-canary.6
eslint-config-next: 13.4.12
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
`npx create-next-app`
### To Reproduce
1. `npx create-next-app` select yes to all
2. `npm run dev`
3. Open browser with React Developer Tools extension
<img width="1316" alt="Screen Shot 2023-07-28 at 3 46 20 PM" src="https://github.com/vercel/next.js/assets/3287719/e570370e-916f-4b1a-981f-548e8627397a">
### Describe the Bug
The [documentation](https://nextjs.org/docs/app/api-reference/next-config-js/reactStrictMode) says:
> Good to know: Since Next.js 13.4, Strict Mode is true by default with app router, so the above configuration is only necessary for pages.
But when I run my app it's not enabled by default
### Expected Behavior
React Strict Mode enabled by default
### Which browser are you using? (if relevant)
Firefox 115.0.3
### How are you deploying your application? (if relevant)
`next dev`
<sub>[NEXT-1484](https://linear.app/vercel/issue/NEXT-1484/react-strict-mode-is-not-enabled-by-default-for-app-router-apps)</sub> | https://github.com/vercel/next.js/issues/53315 | https://github.com/vercel/next.js/pull/53375 | c89f97ea56182af23f4ad7e215a8c33224094fd8 | 96a59344e8e1b5a95314f405f2fbf825cf3f1476 | "2023-07-28T20:59:08Z" | javascript | "2023-08-22T18:17:17Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,312 | ["packages/next/src/lib/format-server-error.ts", "packages/next/src/server/typescript/constant.ts", "test/development/acceptance-app/server-components.test.ts"] | Importing experimental_useOptimistic in a server component throws wrong 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.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 16.20.1
npm: 8.19.4
Yarn: 1.22.19
pnpm: 8.6.10
Relevant Packages:
next: 13.4.13-canary.6
eslint-config-next: 13.4.3
react: 18.2.0
react-dom: 18.2.0
typescript: 5.0.4
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/adrianbw/use-optimistic-broken
### To Reproduce
Call `useOptimistic` in a server component. Get this error instead of the correct error telling you not to use it server side:
<img width="1069" alt="Screenshot 2023-07-28 at 3 23 22 PM" src="https://github.com/vercel/next.js/assets/12662580/e75d8d9f-50b4-41bb-a816-e291a8719c11">
### Describe the Bug
When you call `useOptimistic` from a server component, you get this error:
<img width="1069" alt="Screenshot 2023-07-28 at 3 23 22 PM" src="https://github.com/vercel/next.js/assets/12662580/e75d8d9f-50b4-41bb-a816-e291a8719c11">
It should be an error telling you not to import `useOptimistic` in a server component.
### Expected Behavior
I would expect to see an error like this:
```
You're importing a component that needs experimental_useOptimistic. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
Learn more: https://nextjs.org/docs/getting-started/react-essentials
```
### 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/53312 | https://github.com/vercel/next.js/pull/53313 | c02dcd540cebcad31989edef8f1bd235d92f82da | 3c84b3ac99e143cec08181616ec89d393e8dbf41 | "2023-07-28T20:25:55Z" | javascript | "2023-08-03T07:21:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,286 | ["Cargo.lock", "Cargo.toml", "packages/next-swc/crates/core/tests/fixture/server-actions/server/6/output.js", "packages/next-swc/crates/core/tests/full/example/output.js", "packages/next/src/build/swc/options.ts"] | next > 13.4.10 too aggressive tree shaking | ### 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: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 19.6.0
npm: 9.4.0
Yarn: N/A
pnpm: 8.5.0
Relevant Packages:
next: 13.4.9
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)
webpack optimization I guess
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/Torsten85/next-13-4-10-tree-shaking-bug
### To Reproduce
run `pnpm i && pnpm test`, see the error (13.4.13-canary.5)
run `git checkout downgrade && pnpm i && pnpm test`, see no error (13.4.9)
### Describe the Bug
SWC minify removes a used chunk of code from a dependency, resulting in a production error
### Expected Behavior
the bundling process should correctly determine that the code block is referenced and in use
### 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/53286 | https://github.com/vercel/next.js/pull/53416 | 59c767b2581cbacbf00388afba28213e36bb9440 | c017765ef2ded8bbe4b15f080577ae4358bb5e62 | "2023-07-28T08:59:05Z" | javascript | "2023-08-02T21:59:19Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,281 | ["packages/next/src/server/app-render/app-render.tsx"] | Next canary 13.4.13-canary.5 will crash in only Safari when server actions is enabled | ### 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.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64
Binaries:
Node: 18.17.0
npm: 9.6.7
Yarn: 1.22.19
pnpm: 8.6.10
Relevant Packages:
next: 13.4.13-canary.5
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)
Server Actions / Browser Compatibility / Mac OS
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/tangye1234/nextjs-bug-test
### To Reproduce
install latest 2 versions of next@canary
```
pnpm dev
```
1. In latest Safari, open localhost:3000, the error overlay will 100% come out when server actions is enabled.
2. If I disable server actions, then I long press command+R to keep refresh homepage, the console will also prints error info sometimes.
### Describe the Bug
In Safari 16.5.2
Unhandled Runtime Error
TypeError: undefined is not an object (evaluating 'originalFactory.call')
### Expected Behavior
works well in safari
### Which browser are you using? (if relevant)
Safari 16.5.2
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1481](https://linear.app/vercel/issue/NEXT-1481/next-canary-13413-canary5-will-crash-in-only-safari-when-server)</sub> | https://github.com/vercel/next.js/issues/53281 | https://github.com/vercel/next.js/pull/53411 | caf5ee80be8df78b87f5bf55e8f65d43f0525363 | 7182d4dd2a680c0ab230e16966836098a6bf5c0a | "2023-07-28T05:36:46Z" | javascript | "2023-07-31T22:32:28Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,273 | ["Cargo.lock", "Cargo.toml", "packages/next-swc/crates/core/tests/fixture/server-actions/server/6/output.js", "packages/next-swc/crates/core/tests/full/example/output.js", "packages/next/src/build/swc/options.ts"] | Application error in production build but not dev mode in [email protected] | ### 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.15.1
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.4.13-canary.4
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.5
Next.js Config:
output: N/A
```
### 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/peterolson/next-cytoscape-bug
### To Reproduce
Clone the repository at https://github.com/peterolson/next-cytoscape-bug and run `npm install`, `next build` and `next start`.
Uses the following dependency:
```
"cytoscape": "^3.25.0"
```
Relevant code as follows:
```
import { useEffect, useRef } from "react";
import cytoscape from 'cytoscape';
/** Add your relevant code here for the issue to reproduce */
export default function Home() {
const graphNode = useRef<HTMLDivElement>(null);
useEffect(() => {
if (!graphNode.current) return;
cytoscape({
container: graphNode.current,
elements: [
{ data: { id: "a" } },
{ data: { id: "b" } },
{
data: {
id: "ab",
source: "a",
target: "b",
},
},
]
});
}, [graphNode]);
return <div ref={graphNode} style={{ width: 100, height: 100 }} />
}
```
### Describe the Bug
Page renders two-node graph as expected with `next dev` development mode.

When running in production mode using `next build` and `next start`, I get this error:
```Application error: a client-side exception has occurred (see the browser console for more information).```

with the following error in the browser console:
```
TypeError: this.selectionType is not a function
```
The error does not appear in next version 13.4.8 or below.
### Expected Behavior
The expected behavior is seen when running `next dev` or by using next version 13.4.8 or below.
The following two-node graph should be rendered without any errors:

### Which browser are you using? (if relevant)
Microsoft Edge Version 115.0.1901.183
### How are you deploying your application? (if relevant)
next start | https://github.com/vercel/next.js/issues/53273 | https://github.com/vercel/next.js/pull/53416 | 59c767b2581cbacbf00388afba28213e36bb9440 | c017765ef2ded8bbe4b15f080577ae4358bb5e62 | "2023-07-27T22:08:39Z" | javascript | "2023-08-02T21:59:19Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,272 | ["packages/next/src/client/image-component.tsx", "test/production/jest/next-image-preload/app/app/layout.tsx", "test/production/jest/next-image-preload/app/app/next.svg", "test/production/jest/next-image-preload/app/app/page.tsx", "test/production/jest/next-image-preload/app/jest.config.js", "test/production/jest/next-image-preload/next-image-preload.test.ts"] | "Error: Uncaught [TypeError: (0 , _reactdom.preload) is not a function]" when running jest | ### 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.13-canary.4
eslint-config-next: 13.4.12
react: 18.2.0
react-dom: 18.2.0
typescript: 5.0.4
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
Jest (next/jest)
### Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/lively-monad-rr5hgl
### To Reproduce
Run `npm run test` in a new terminal in the codesandbox repro provided
### Describe the Bug
In jest tests where `<Image />` from `next/image` is being used with `priority={true}` set, when I attempt to run `jest` it throws this error `Error: Uncaught [TypeError: (0 , _reactdom.preload) is not a function]`.
It seems to be introduced in [email protected], when I install [email protected] the error goes away. It also prints `The above error occurred in the <ImagePreload> component` in the terminal so I tracked it down to this PR (https://github.com/vercel/next.js/pull/52425) where `preload` from `react-dom` is imported and used in that component which I suspect could be part of the issue.
Not sure of how to workaround the issue, but I'm open to suggestions.
### Expected Behavior
I expect to be able to run jest tests using Image components without errors from the framework.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1482](https://linear.app/vercel/issue/NEXT-1482/error-uncaught-[typeerror-0-reactdompreload-is-not-a-function]-when)</sub> | https://github.com/vercel/next.js/issues/53272 | https://github.com/vercel/next.js/pull/53443 | c669c383a09c8e3fda09fa6c7feac409583c7978 | b41497d7631d36e0ce5849a05b96cd93e7e27e70 | "2023-07-27T21:59:55Z" | javascript | "2023-08-08T01:04:40Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,267 | ["docs/02-app/02-api-reference/04-functions/redirect.mdx"] | Docs: Removal of repeated closing bracket | ### What is the improvement or update you wish to see?
While I was checking out the https://nextjs.org/docs/app/api-reference/functions/redirect section of the nextjs docs, I observed that there is a repeated closing bracket ')' just after 'Server Actions' in the [Parameters](https://nextjs.org/docs/app/api-reference/functions/redirect#parameters) section

I've actually made a PR to fix this https://github.com/vercel/next.js/pull/53268
### Is there any context that might help us understand?
The bracket is not meant to be repeated, there is no corresponding opening bracket
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/api-reference/functions/redirect#parameters
| https://github.com/vercel/next.js/issues/53267 | https://github.com/vercel/next.js/pull/53268 | f8107f0abb3b2fcb5ea1a04133b35bd7533f77b6 | 37bb09d36aa4bb96292bead7d9d9e3a3f7a10be7 | "2023-07-27T18:11:38Z" | javascript | "2023-07-27T19:35:34Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,261 | ["test/e2e/app-dir/actions/app-action.test.ts", "test/e2e/app-dir/actions/app/mutate-cookie/page-2/page.js", "test/e2e/app-dir/actions/app/mutate-cookie/page.js"] | cookies().set() doesn't invalidate client cache | ### 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.13-canary.4
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.5
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/tender-banzai-sn635z
### To Reproduce
1. Go to [CodeSandBox](https://codesandbox.io/p/sandbox/tender-banzai-sn635z)
2. Go to the `set` section
3. Enter a new session cookie value and press `Update Session`
4. Go to the home section and check if the new session cookie value is visible
5. Refresh the page
6. The session value should now display the actual value
https://github.com/vercel/next.js/assets/80746311/2a0af398-1b3a-4c7f-86ba-d53bf2f477ce
### Describe the Bug
After setting new cookies, the page doesn't invalidate client cache. As a result, the new cookie value is not immediately visible, and the old cookie value is still visible on the page. Clicking on `refresh` makes the new cookie value appear correctly. This issue seems to have surfaced after upgrading to Next.js `13.4.11-canary.1`. This behavior worked fine in Next.js `13.4.10`.
### Expected Behavior
After setting cookies, it should invalidate the client cache. The new cookie value should be immediately visible without requiring a page refresh.
@shuding, maybe it is related to this PR?
- https://github.com/vercel/next.js/pull/51290
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1478](https://linear.app/vercel/issue/NEXT-1478/cookiesset-doesnt-invalidate-client-cache)</sub> | https://github.com/vercel/next.js/issues/53261 | https://github.com/vercel/next.js/pull/53494 | 3c84b3ac99e143cec08181616ec89d393e8dbf41 | 0ecde6bd32dac474ec5342fc9e70c54363636717 | "2023-07-27T15:02:52Z" | javascript | "2023-08-03T11:02:19Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,195 | ["packages/next/src/client/components/error-boundary.tsx", "test/e2e/app-dir/app-static/app-static.test.ts", "test/e2e/app-dir/app-static/app/isr-error-handling/error.txt", "test/e2e/app-dir/app-static/app/isr-error-handling/page.js"] | Server Error leaks into Client on revalidation | ### 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: Thu Jun 8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103
Binaries:
Node: 18.13.0
npm: 8.19.3
Yarn: 1.22.19
pnpm: 7.33.0
Relevant Packages:
next: 13.4.13-canary.3
eslint-config-next: 13.4.12
react: 18.2.0
react-dom: 18.2.0
typescript: 4.8.4
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Routing (next/router, next/navigation, next/link)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/basementstudio/app-dir-example/tree/canary
### To Reproduce
In the index page, we perform a `fetch` to get a list of Pokemons. We set the revalidate for the `fetch` to `1`, for us to see the issue more frequently. The catch here is that we are randomly `throw`ing an error. Preview is [here](https://app-dir-example-git-canary-basement.vercel.app/).
Steps to reproduce:
1. Start session in https://app-dir-example-git-canary-basement.vercel.app/example#with-hash
2. Navigate to the home page (”Home” link in header)
3. If you don’t yet see the Application Error, go back to Example (”Go to title in content” link) and click Refresh
4. Repeat steps 2 and 3 until you see the Application Error
### Describe the Bug
When any error is thrown server-side, the client shows an application exception on navigation.
<img width="1440" alt="Screenshot 2023-07-26 at 01 42 29" src="https://github.com/vercel/next.js/assets/48418633/bb3a9f08-88b8-43fb-b38f-f08f96afee48">
### Expected Behavior
After a failure during revalidation, the app should display the data from the last successful revalidation.
From Next.js Docs:
> If an error is thrown while attempting to revalidate data, the last successfully generated data will continue to be served from the cache. On the next subsequent request, Next.js will retry revalidating the data.
### Which browser are you using? (if relevant)
Not relevant
### How are you deploying your application? (if relevant)
Vercel | https://github.com/vercel/next.js/issues/53195 | https://github.com/vercel/next.js/pull/57332 | 63aa0fe8ac3e647e43042dc6b8f35f6e768a7429 | ae10b5c82b29b3b077378f05f75eb1b215b327f0 | "2023-07-26T04:45:48Z" | javascript | "2023-10-24T16:38:30Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,187 | ["packages/next/src/server/lib/incremental-cache/file-system-cache.ts", "test/e2e/app-dir/app-static/app-static.test.ts"] | On-demand revalidation inconsistent on App router vs. Pages when deploying to Vercel | ### 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.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64
Binaries:
Node: 18.16.1
npm: 9.5.1
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.4.12
eslint-config-next: 13.4.12
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
Note: the reported issue relates to the Vercel environments only.
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/Windsorborn/next-revalidation-test-app
### To Reproduce
1. Clone the provided repository (https://github.com/Windsorborn/next-revalidation-test-app)
2. Setup a project on Vercel and deploy the code
3. View the home page and take note of the timestamp
4. Hit the revalidation endpoint - /api/revalidate?tag=timezone&secret=O5mc4yJp8d6j
5. Refresh the page
### Describe the Bug
On first view of the page after hitting the revalidation endpoint, the page requires two refreshes to see the fresh data. This is not consistent with the behaviour of the Pages configuration which only requires one refresh or visit.
See video: https://imgur.com/T4xduRU
### Expected Behavior
The expected behaviour is to replicate the res.revalidate function within the Pages configuration where one refresh shows the fresh data.
To reproduce this:
1. Clone the following repository - https://github.com/Windsorborn/next-revalidation-test-pages
2. Setup a project on Vercel and deploy the code
3. View the home page and take note of the timestamp
4. Hit the revalidation endpoint - /api/revalidate?secret=O5mc4yJp8d6j
5. Refresh the page or soft-navigate from Another Page (/another-page)
The timestamp reflects the updated data
See video: https://imgur.com/NqxN44T
### 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/53187 | https://github.com/vercel/next.js/pull/53595 | acf5e8455692150cba94a3a12ad89473d9fa94b3 | e4aecabc7d8e781712f5f0495f59bb4f9b893603 | "2023-07-26T02:49:53Z" | javascript | "2023-08-04T23:31:18Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,151 | ["Cargo.lock", "Cargo.toml", "packages/next-swc/crates/core/tests/fixture/server-actions/server/6/output.js", "packages/next-swc/crates/core/tests/full/example/output.js", "packages/next/src/build/swc/options.ts"] | Regression of tippy.js between 13.4.10-canary.0 and 13.4.10-canary.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: x64
Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64
Binaries:
Node: 18.15.0
npm: 9.6.6
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 13.4.12
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)
_No response_
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/damianfrizzi/nextjs-tippy-regression
### To Reproduce
- Clone the minimal repro
- Run `yarn dev` -> everything works fine
- Run `yarn build` and `yarn start` -> app crashes with _Application error: a client-side exception has occurred (see the browser console for more information)._
### Describe the Bug
We tried to upgrade to the latest Next.js and it broke pages that where using `@tippyjs/react`.
**This only happens in production.** Everything works correctly in development.
Git bisect shows me that the regression was introduced between [13.4.10-canary.0 (good) and 13.4.10-canary.1 (bad)](https://github.com/vercel/next.js/compare/v13.4.10-canary.0...v13.4.10-canary.1).
### Expected Behavior
- The behaviour between development and production should be the same
- The app shouldn't crash in production
| https://github.com/vercel/next.js/issues/53151 | https://github.com/vercel/next.js/pull/53416 | 59c767b2581cbacbf00388afba28213e36bb9440 | c017765ef2ded8bbe4b15f080577ae4358bb5e62 | "2023-07-25T08:26:25Z" | javascript | "2023-08-02T21:59:19Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,083 | ["packages/next/src/server/app-render/app-render.tsx", "test/e2e/app-dir/error-boundary-and-not-found-linking/error-boundary-and-not-found-linking.test.ts", "test/e2e/app-dir/error-boundary-and-not-found-linking/error-navigation-override-node-env.test.ts", "test/lib/next-modes/next-dev.ts", "test/lib/next-modes/next-start.ts"] | `not-found` build hangs with `NODE_ENV=test` | ### 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.12
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.5
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/reverent-matan-pvw8wk?file=%2F.codesandbox%2Ftasks.json%3A10%2C4
### To Reproduce
1. Visit the CodeSandbox link above, which uses `NODE_ENV=test next build`
2. The `build-and-start` task, which starts automatically, hangs and never completes💥 (process exits after 3 retries)
```sh
$ next build
- info Creating an optimized production build
- info Compiled successfully
- info Linting and checking validity of types
- info Collecting page data
- warn Restarted static page generation for /_not-found because it took more than 60 seconds
- warn See more info here https://nextjs.org/docs/messages/static-page-generation-timeout
- warn Restarted static page generation for /_not-found because it took more than 60 seconds
> Build error occurred
Error: Static page generation for /_not-found is still timing out after 3 attempts. See more info here https://nextjs.org/docs/messages/static-page-generation-timeout
at onRestart (/project/sandbox/node_modules/next/dist/build/index.js:697:39)
at Worker.exportPage (/project/sandbox/node_modules/next/dist/lib/worker.js:88:40)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /project/sandbox/node_modules/next/dist/export/index.js:519:32
at async Span.traceAsyncFn (/project/sandbox/node_modules/next/dist/trace/trace.js:103:20)
at async Promise.all (index 2)
at async /project/sandbox/node_modules/next/dist/export/index.js:510:9
at async Span.traceAsyncFn (/project/sandbox/node_modules/next/dist/trace/trace.js:103:20)
at async /project/sandbox/node_modules/next/dist/build/index.js:1579:21
at async Span.traceAsyncFn (/project/sandbox/node_modules/next/dist/trace/trace.js:103:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
<img width="934" alt="Screenshot 2023-07-23 at 19 03 30" src="https://github.com/vercel/next.js/assets/1935696/d0f16ac8-9701-4129-ae96-39c17bc92b39">
This may have been caused by the following PR by @huozhi, reviewed by @ijjk :
- https://github.com/vercel/next.js/pull/52985
### Describe the Bug
The `not-found` page build hangs when using `NODE_ENV=test`
This behavior is not present when using `[email protected]`
This may have been caused by the following PR by @huozhi, reviewed by @ijjk :
- https://github.com/vercel/next.js/pull/52985
Related issue (not exactly a dupe): https://github.com/vercel/next.js/issues/53082
### Expected Behavior
The `not-found` page build should succeed when using `NODE_ENV=test`
### 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/53083 | https://github.com/vercel/next.js/pull/53106 | 9da305fe320b89ee2f8c3cfb7ecbf48856368913 | d8f4fa89466bf52c43abb7f89d1c139686775343 | "2023-07-23T17:06:50Z" | javascript | "2023-07-24T21:00:53Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,082 | ["packages/next/src/server/app-render/app-render.tsx", "test/e2e/app-dir/error-boundary-and-not-found-linking/error-boundary-and-not-found-linking.test.ts", "test/e2e/app-dir/error-boundary-and-not-found-linking/error-navigation-override-node-env.test.ts", "test/lib/next-modes/next-dev.ts", "test/lib/next-modes/next-start.ts"] | `not-found` page load hangs with `NODE_ENV=test` | ### 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.12
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.5
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Routing (next/router, next/navigation, next/link)
### Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/infallible-joliot-yk4dhw?file=%2F.codesandbox%2Ftasks.json%3A15%2C26
### To Reproduce
1. Visit the CodeSandbox link above, which uses `NODE_ENV=test next start`
2. Click on the `to not-found` link on the homepage
3. The page never responds 💥 (504 Gateway Timeout after a while)
<img width="1272" alt="Screenshot 2023-07-23 at 17 56 15" src="https://github.com/vercel/next.js/assets/1935696/5ae36eb8-c731-4f0d-866d-37781021c01f">
### Describe the Bug
The `not-found` page load hangs when using `NODE_ENV=test`
This behavior is not present when using `[email protected]`
This may have been caused by the following PR by @huozhi, reviewed by @ijjk :
- https://github.com/vercel/next.js/pull/52985
Related issue (not exactly a dupe): https://github.com/vercel/next.js/issues/53083
### Expected Behavior
The `not-found` page load should not hang when using `NODE_ENV=test`
### 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/53082 | https://github.com/vercel/next.js/pull/53106 | 9da305fe320b89ee2f8c3cfb7ecbf48856368913 | d8f4fa89466bf52c43abb7f89d1c139686775343 | "2023-07-23T16:57:45Z" | javascript | "2023-07-24T21:00:53Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,072 | ["packages/next/src/server/dev/on-demand-entry-handler.ts", "test/e2e/children-page/app/children/page.js", "test/e2e/children-page/app/layout.js", "test/e2e/children-page/index.test.ts", "test/e2e/children-page/pages/other/children.js"] | Routes named "children" are not accessible in dev mode | ### 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.12-canary.0
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.4
Next.js Config:
output: N/A
```
### 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/spring-rgb-6f7kql
### To Reproduce
1. Create a file named "children.tsx" under the /pages dir
2. Run next.js dev server
3. Try to navigate to `/children` page in the browser
### Describe the Bug
Routes having `/children` substring are not accessible in the dev mode.
In the provided codesandbox example routes `/children` and `/profile/children` do not work while deliberately misspelled `/chiltren` works just fine.
Looks like this behaviour was introduced by https://github.com/vercel/next.js/pull/52362
### Expected Behavior
Pages are accessible in dev/prod mode disregarding their name.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1514](https://linear.app/vercel/issue/NEXT-1514/routes-named-children-are-not-accessible-in-dev-mode)</sub> | https://github.com/vercel/next.js/issues/53072 | https://github.com/vercel/next.js/pull/54007 | 210053b151d6595588f801830e713fec470428f2 | e02397d26473ac41a3d6dd6a396769b584dd0e49 | "2023-07-23T09:04:39Z" | javascript | "2023-08-15T03:50:37Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,065 | ["packages/next/src/build/swc/options.ts", "test/production/jest/rsc/app/server-action/action.js", "test/production/jest/rsc/app/server-action/page.jsx", "test/production/jest/rsc/app/server-action/page.test.jsx"] | Jest cannot test "use server" file | ### 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.16.0
npm: 9.5.1
Yarn: 1.22.19
pnpm: 8.5.1
Relevant Packages:
next: 13.4.12-canary.0
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.5
Next.js Config:
output: N/A
warn - Latest canary version not detected, detected: "13.4.12-canary.0", newest: "13.4.12".
Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Jest (next/jest)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/mkizka/nextjs-serveractions-jest
### To Reproduce
```
git clone https://github.com/mkizka/nextjs-serveractions-jest
cd nextjs-serveractions-jest
yarn
yarn test
```
### Describe the Bug
I got this message even though serverActions is true. This test passes if I remove "use server".
```
$ cat next.config.js
/** @type {import("next").NextConfig} */
module.exports = {
reactStrictMode: true,
experimental: {
serverActions: true,
},
};
$ yarn test
yarn run v1.22.19
$ jest
- warn You have enabled experimental feature (serverActions) 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.
FAIL app/action.test.ts
● Test suite failed to run
× To use Server Actions, please enable the feature flag in your Next.js config. Read more: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#convention
╭─[/home/ubuntu/nextjs-serveractions-jest/app/action.ts:1:1]
1 │ "use server";
· ────────────
2 │
3 │ export const action = () => {
4 │ console.log("action called");
╰────
3 | jest.spyOn(console, "log");
4 |
> 5 | test("action", () => {
| ^
6 | action();
7 | expect(console.log).toHaveBeenCalledWith("action called");
8 | });
at Object.transformSync (node_modules/next/src/build/swc/index.ts:1000:25)
at Object.<anonymous> (app/action.test.ts:5:17)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.15 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
### Expected Behavior
The test succeeds.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1473](https://linear.app/vercel/issue/NEXT-1473/jest-cannot-test-use-server-file)</sub> | https://github.com/vercel/next.js/issues/53065 | https://github.com/vercel/next.js/pull/56148 | 8f0f8236ab4d7f03980015cb2986b01ccf822918 | 48093b87a9c01265d017ce49da806b9d31dc1cd8 | "2023-07-23T05:57:59Z" | javascript | "2023-09-28T14:15:51Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 53,006 | ["packages/next/src/client/app-index.tsx", "packages/next/src/client/components/react-dev-overlay/internal/helpers/get-socket-protocol.ts", "packages/next/src/client/components/react-dev-overlay/internal/helpers/get-socket-url.ts", "packages/next/src/client/components/react-dev-overlay/internal/helpers/use-websocket.ts"] | Hydration errors introduced begining with `13.4.11-canary.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: 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: 1.22.10
pnpm: 8.2.0
Relevant Packages:
next: 13.4.11
eslint-config-next: 13.4.11
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/Kinbaum/hydration-error/tree/main
### To Reproduce
1. Clone the repository and run `yarn`
2. Run `yarn dev`
3. Navigation to http://localhost:3000
4. Open up the dev tools and see the error in the console
<img width="1278" alt="Screenshot 2023-07-21 at 9 52 14 AM" src="https://github.com/vercel/next.js/assets/6590356/ffebcbc6-4230-4cbb-884d-d332eba836f7">
### Describe the Bug
This appears to be a hydration issue
### Expected Behavior
I would not expect to see this error. Within this repo, I've also included a working version example where the only change is that I am running next `13.4.10` rather than `13.4.11`
1. Run a `git switch working-verion`
2. Then run `yarn`
3. Navigation to http://localhost:3000
4. Open up the dev tools and see that there is no hydration error with the previous release
<img width="1279" alt="Screenshot 2023-07-21 at 9 50 50 AM" src="https://github.com/vercel/next.js/assets/6590356/a4a86c01-b539-448c-9e35-0237a6b490a7">
### 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/53006 | https://github.com/vercel/next.js/pull/53216 | 66ffc3cd3907c195132adad6366244ecfa79d0da | b0c1697f1e3f15109a9e00e32d41c7b4ca792eaa | "2023-07-21T13:57:55Z" | javascript | "2023-07-26T18:17:59Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,967 | ["packages/next/src/server/web/spec-extension/request.ts", "test/unit/web-runtime/next-request.test.ts"] | `NextRequest` constructor doesn't match `Request` behaviour for cloning | ### 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: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 18.13.0
npm: 8.13.2
Yarn: 1.22.19
pnpm: 8.6.6
Relevant Packages:
next: 13.4.11-canary.0
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.4
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Middleware / Edge (API routes, runtime)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/tom-sherman/nextrequest-consructor-bug
### To Reproduce
Attempt to clone the request like so:
```ts
const newRequest = new NextRequest(request)
```
### Describe the Bug
Headers and body isn't preserved from `request` in route handlers and middleware.
### Expected Behavior
As is with `new Request(request)`, headers and body should be preserved/copied into the new request object.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1468](https://linear.app/vercel/issue/NEXT-1468/nextrequest-constructor-doesnt-match-request-behaviour-for-cloning)</sub> | https://github.com/vercel/next.js/issues/52967 | https://github.com/vercel/next.js/pull/53157 | d68097553730d859a6be91158fc3e489f971ea57 | e1133cf0970e80d8f88e6c3516881780703eb7f5 | "2023-07-20T22:04:28Z" | javascript | "2023-07-25T11:36:39Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,962 | ["packages/next/src/server/pipe-readable.ts", "packages/next/src/server/render-result.ts", "packages/next/src/server/send-response.ts"] | Vercel deployment uses stale data cache ignoring previous re-validations with revalidateTag | ### 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.11-canary.0
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.5
Next.js Config:
output: N/A
```
### 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/next-52962-w2xxc5
### To Reproduce
1) Clone https://codesandbox.io/p/sandbox/next-52962-w2xxc5 into a GitHub repository
2) Deploy GitHub repository to Vercel
3) Open the deployment URL, make note of the timestamp on the page
4) Click the Refresh button (reload the page if the data doesn't refresh on its own)
5) Make note of the timestamp on the page (it is expected to be different from the one in step 3)
6) Make any code change and commit to GitHub triggering new deployment on Vercel
7) Open the deployment URL, make note of the timestamp on the page - it's the same as in step 3
The deployment in step 6 used stale data cache from deployment in step 2 completely ignoring data re-validation in step 4.
### Describe the Bug
Vercel deployments re-use stale data cached from previous deployments completely ignoring data re-validation performed by `revalidateTag` since previous deployment.
### Expected Behavior
New deployments must either fetch new data or use the results of the last fetch request, not the data from previous deployment which could have happened days ago.
### 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/52962 | https://github.com/vercel/next.js/pull/58744 | a2b781fafe54011d9f006a9423cfbd0d14d551c4 | 48a566bc4fcfc48d8489f096a87e792912c4989f | "2023-07-20T19:30:33Z" | javascript | "2023-11-22T02:37:35Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,929 | ["packages/next/src/build/webpack/plugins/next-types-plugin/index.ts", "packages/next/src/client/link.tsx", "packages/next/types/index.d.ts"] | Next-link props | ### 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.7.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.4.7
eslint-config-next: 13.4.8
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
warn - Latest canary version not detected, detected: "13.4.7", newest: "13.4.11-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 or a replay of the bug
https://codesandbox.io/p/sandbox/runtime-resonance-rvkftd?file=%2Fsrc%2Fcomponents%2FBaseLink.tsx%3A10%2C22
codesandbox failed to reproduce.
### To Reproduce
```
import React, { FC } from 'react'
import { Box } from '@/shared/ui'
import { Typography } from '@mui/material'
import ArrowRight from 'public/icons/arrow_right.svg'
import Link, { LinkProps } from 'next/link'
export type BaseLinkProps = {
text: string
} & LinkProps
const BaseLink: FC<BaseLinkProps> = ({ text, ...props }) => {
return (
<Link {...props}>
<Box
flexDirection="row"
justifyContent="space-between"
alignItems="center"
width="100%"
mb={2}
>
<Typography variant="subtitle1">{text}</Typography>
<ArrowRight />
</Box>
</Link>
)
}
export default BaseLink
```
### Describe the Bug

This error occurs when running tsc --pretty
Ide does not highlight this error without running the tsc --pretty command
### Expected Behavior
I expected everything to be fine, because LinkProps is not Generic
### Which browser are you using? (if relevant)
Chrome
### How are you deploying your application? (if relevant)
next-dev
localhost | https://github.com/vercel/next.js/issues/52929 | https://github.com/vercel/next.js/pull/54226 | ec438418a437068f104f8f7892abe2fb3e2b7988 | b25407e4e4b7dc437a77f93b13ed3f28d66a2b69 | "2023-07-20T08:34:18Z" | javascript | "2023-08-18T14:41:21Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,862 | ["packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/@slot/(.)nested/client.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/@slot/(.)nested/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"] | Could not find the module in the React Client Manifest. 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: darwin
Arch: arm64
Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103
Binaries:
Node: 16.20.0
npm: 8.19.4
Yarn: 1.22.19
pnpm: 8.6.0
Relevant Packages:
next: 13.4.11-canary.0
eslint-config-next: 13.4.8
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### 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/vercel/next.js/assets/16620277/58d05257-6176-47bb-bca5-b84afb6c5843
### To Reproduce
https://stackblitz.com/github/easydevgit/next-13-course/tree/master/advanced-routing-intercepting-routes?file=app/layout.tsx
### Describe the Bug
<img width="723" alt="Screenshot 2023-07-19 at 3 46 47 PM" src="https://github.com/vercel/next.js/assets/16620277/ba8e7736-054d-4583-a3c6-6046de465b39">
<img width="1829" alt="Screenshot 2023-07-19 at 3 54 29 PM" src="https://github.com/vercel/next.js/assets/16620277/79958618-10d3-44a5-9567-3c54f11f3859">
I am getting this error after updating to 13.4.10 and also on latest canary. It is working fine on 13.4.9.
I am using parallel and intercepting routes.
### Expected Behavior
Normal parallel and intercepting route behaviour.
### 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/52862 | https://github.com/vercel/next.js/pull/52961 | 2b497413087c56dedb3e04f77ea0deebb5d12d0b | a96a9b07910ecce7c491c5dc957faf5f6468c929 | "2023-07-19T10:22:46Z" | javascript | "2023-07-20T20:06:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,782 | ["docs/02-app/01-building-your-application/05-optimizing/08-open-telemetry.mdx"] | Docs: Improve OpenTelemetry manual config | ### What is the improvement or update you wish to see?
I'd like to improve OpenTelemetry docs, more specifically the [Manual OpenTelemetry configuration](https://nextjs.org/docs/app/building-your-application/optimizing/open-telemetry#manual-opentelemetry-configuration) section
### Is there any context that might help us understand?
I had set up OpenTelemetry instrumentation for a production app, using the manual configuration guide as a starting point. I noticed these mistakes while reading the docs:
- `@opentelemetry/sdk-trace-base` is listed in the dependencies instead of `@opentelemetry/sdk-trace-node` (which the example code actually imports)
- `instrumentation.js` references `./instrumentation.node.ts` rather than `./instrumentation.node.js`
- `instrumentation.node.ts` contains unused imports
```ts
import { trace, context } from '@opentelemetry/api'
```
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/building-your-application/optimizing/open-telemetry#manual-opentelemetry-configuration | https://github.com/vercel/next.js/issues/52782 | https://github.com/vercel/next.js/pull/52784 | d8660bb05901f9c4d2f112bf7f813bc51c4aeeae | d18334ae928e979a8e2593a74c41ecde335e6528 | "2023-07-17T11:10:50Z" | javascript | "2023-07-19T02:46:30Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,759 | ["docs/02-app/02-api-reference/04-functions/generate-metadata.mdx"] | Docs: generateMetadata function bug | ### What is the improvement or update you wish to see?
```
```jsx filename="app/products/[id]/page.jsx" switcher
import { Metadata } from 'next'
export async function generateMetadata(
{ params, searchParams },
parent
) {
// read route params
const id = params.id
// fetch data
const product = await fetch(`https://.../${id}`).then((res) => res.json())
// optionally access and extend (rather than replace) parent metadata
const previousImages = (await parent).openGraph?.images || []
return {
title: product.title,
openGraph: {
images: ['/some-specific-page-image.jpg', ...previousImages],
},
}
}
export default function Page({ params, searchParams }) {}
```
### Is there any context that might help us understand?
The switcher causes problems in the docs, since it is possible to switch to the javascript version, when there isn't any. If code example switched to javascript, the code example preview will completely disappear and a refresh is required. Either remove the switcher I guess or add the javascript version
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/api-reference/functions/generate-metadata#generatemetadata-function | https://github.com/vercel/next.js/issues/52759 | https://github.com/vercel/next.js/pull/52763 | f5f79e7a8c4315d4a131286df189a3d94accbae9 | 503677c0998e3d0711359644d5d7caf3cc067491 | "2023-07-17T00:02:03Z" | javascript | "2023-07-17T15:23:54Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,745 | ["packages/next/src/client/components/app-router-headers.ts", "packages/next/src/client/components/router-reducer/fetch-server-response.ts", "test/e2e/app-dir/app-prefetch/app/dashboard/page.js", "test/e2e/app-dir/app-prefetch/prefetching.test.ts", "test/e2e/app-dir/app/index.test.ts", "test/integration/custom-routes/test/index.test.js", "test/integration/dynamic-routing/test/index.test.js"] | Possible CDN cache corruption due to missing `Next-Url` in http vary | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```bash
Not environmentally dependent.
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/AkifumiSato/http-vary-has-not-next-url
### To Reproduce
See response header in flight.
### Describe the Bug
The Vary header must contain the header name that determines the use of cache.
The function of intercepting-routes changes the contents of the flight to be returned based on the `Next-Url`, but is not described in the http-vary.
This may cause unexpected caching behavior by the CDN.
### Expected Behavior
Vary header `Next-Url` must be listed.
### 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/52745 | https://github.com/vercel/next.js/pull/52746 | a0ea5f2d792e395e6f1bf241fa3a1dd5de13f338 | 1494283a741b3002480637758a21fa0abc9c23a5 | "2023-07-16T12:41:42Z" | javascript | "2023-07-22T21:38:23Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,681 | ["packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/@slot/(.)nested/client.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/@slot/(.)nested/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"] | Intercepting routes dose not work when importing client component(13.4.10 breaks) | ### 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.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64
Binaries:
Node: 18.16.0
npm: 9.5.1
Yarn: 1.22.19
pnpm: 8.6.3
Relevant Packages:
next: 13.4.10
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 Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/tangye1234/stackblitz-starters-ktbdbe
### To Reproduce
```shell
pnpm install
pnpm dev
```
click the login link, to intercept the /login page
### Describe the Bug
Client crash with error said: Error:
`Could not find the module "/app/_modal.jsx#Modal" in the React Client Manifest. This is probably a bug in the React Server Components bundler.`
### Expected Behavior
The next with version between 13.4.5 - 13.4.9 works well with this codes.
13.4.10 / canary dose not.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
selfhost | https://github.com/vercel/next.js/issues/52681 | https://github.com/vercel/next.js/pull/52961 | 2b497413087c56dedb3e04f77ea0deebb5d12d0b | a96a9b07910ecce7c491c5dc957faf5f6468c929 | "2023-07-14T15:22:17Z" | javascript | "2023-07-20T20:06:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,672 | ["packages/next-swc/crates/core/src/lib.rs", "packages/next-swc/crates/core/tests/fixture.rs", "packages/next-swc/crates/core/tests/fixture/next-dynamic-app-dir/no-ssr/input.js", "packages/next-swc/crates/core/tests/fixture/next-dynamic-app-dir/no-ssr/output-dev.js", "packages/next-swc/crates/core/tests/fixture/next-dynamic-app-dir/no-ssr/output-prod.js", "packages/next-swc/crates/core/tests/fixture/next-dynamic-app-dir/no-ssr/output-server.js", "test/e2e/app-dir/actions/app-action.test.ts", "test/e2e/app-dir/actions/app/dynamic-csr/csr.js", "test/e2e/app-dir/actions/app/dynamic-csr/page.js"] | Error when calling Server Action from dynamically imported component with `ssr: 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: arm64
Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:21:34 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8112
Binaries:
Node: 18.16.1
npm: 9.5.1
Yarn: 1.22.19
pnpm: 8.6.7
Relevant Packages:
next: 13.4.10
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)
_No response_
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/rijk/repro-server-actions-undefined
### To Reproduce
1. Click button 1 — observe console.log on server
2. Click button 2 — error
### Describe the Bug
`Error: __webpack_modules__[moduleId] is not a function`
or
`Error: Cannot read properties of undefined (reading 'workers')`
### Expected Behavior
Same as button 1
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1459](https://linear.app/vercel/issue/NEXT-1459/error-when-calling-server-action-from-dynamically-imported-component)</sub> | https://github.com/vercel/next.js/issues/52672 | https://github.com/vercel/next.js/pull/54411 | 1e3920c3dde6a96623205f968aee6e18db7843dc | ad556aee1bfca018b604517badc4252afb7a6d3b | "2023-07-14T10:05:05Z" | javascript | "2023-08-23T12:15:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,591 | ["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 actions failing when route is intercepted | ### 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:07:22 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T6000
Binaries:
Node: 18.16.1
npm: 9.5.1
Yarn: 3.4.1
pnpm: N/A
Relevant Packages:
next: 13.4.10-canary.4
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.5
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/baked-dev/interception-actions-reproduction
### To Reproduce
Working:
- open index route
- press "open modal" button
- press "test" button
Not working:
- open `/test`
- press "test" button
### Describe the Bug
Intercepting routes seems to make server actions defined in the un-intercepted version of that same route fail with a 500 error, logging the following:
```
- error TypeError: __webpack_modules__[moduleId] is not a function
at Object.__webpack_require__ [as require] (/.next/server/webpack-runtime.js:33:42)
```
Note: this issue did not happen in the dev mode of 13.4.8, only when deployed to vercel. In 13.4.9-canary.4 it also happens in the dev environment. In our 13.4.8 deployment on vercel i was able to see the response headers reporting the matched path as `/(...)test` when invoking the action from the full, un-intercepted page
### Expected Behavior
Server actions should be working when routes are intercepted.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
Vercel
<sub>[NEXT-1436](https://linear.app/vercel/issue/NEXT-1436/server-actions-failing-when-route-is-intercepted)</sub> | https://github.com/vercel/next.js/issues/52591 | https://github.com/vercel/next.js/pull/59175 | 840b60bc8bb1e760a85c5e19388072dcd0751b78 | 363c2e8eb7e0bfdb2c89d1129e3d440f8848ad8b | "2023-07-12T12:36:46Z" | javascript | "2023-12-01T22:45:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,575 | ["docs/02-app/01-building-your-application/04-styling/03-css-in-js.mdx"] | Docs: MUI Core components now support the App Router | ### What is the improvement or update you wish to see?
Hey @molebox & crew! 👋
As of [v5.14.0](https://github.com/mui/material-ui/releases/tag/v5.14.0), MUI's Core component libraries (Material UI, Base UI, Joy UI) are now exported with the `"use client"` directive so they'll play nicely with the Next.js App Router. 🙌
Can we bump Material UI up to the "Supported as Client Components" list on [this page in the Next.js docs](https://nextjs.org/docs/app/building-your-application/styling/css-in-js)?
It'd be really sweet if it linked to [this guide on using Material UI with the App Router](https://mui.com/material-ui/guides/next-js-app-router/) in our docs. 😇
I'm happy to open a PR to bang this out if it's cool with you!
### Is there any context that might help us understand?
N/A
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/building-your-application/styling/css-in-js | https://github.com/vercel/next.js/issues/52575 | https://github.com/vercel/next.js/pull/52584 | e1baffcec2cab3afd6efed69dfa3939275f6276f | 82cf9a670e8346687872f613a73db3ad2cc47a7c | "2023-07-12T00:10:57Z" | javascript | "2023-07-12T19:50:20Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,548 | ["packages/next/src/shared/lib/image-blur-svg.ts", "test/integration/image-optimizer/test/index.test.ts", "test/integration/image-optimizer/test/util.ts", "test/integration/next-image-new/app-dir/test/index.test.ts", "test/integration/next-image-new/app-dir/test/static.test.ts", "test/integration/next-image-new/base-path/test/static.test.js", "test/integration/next-image-new/default/test/index.test.ts", "test/integration/next-image-new/default/test/static.test.ts"] | <Image /> placeholder image appears "washed out" due to feathered edges | ### 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: 19.7.0
npm: 9.5.0
Yarn: 1.22.19
pnpm: 8.6.6
Relevant Packages:
next: 13.4.10-canary.3
eslint-config-next: 13.0.4
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.3
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
Image optimization (next/image, next/legacy/image)
### Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/competent-agnesi-sw4tsq?file=%2Fpages%2Findex.tsx%3A30%2C9
### To Reproduce
- Open DevTools network tab,
- Check the "disable cache" checkbox,
- Set network throttling to "Slow 3G",
- Click "Refresh" button in Codesandbox and wait for placeholder images to show up
### Describe the Bug
When placeholder image file type is different than JPEG, placeholder images have feathered / washed out edges around them:
<img width="740" alt="Screenshot 2023-07-11 at 14 30 45" src="https://github.com/vercel/next.js/assets/28541613/f76d5f0f-7dce-4b82-bb2b-1b29a6f271c7">
### Expected Behavior
Placeholder images should keep hard/solid edges around them no matter what type of file extensions is used for the placeholder image (JPEG, JPG, GIF, WEBP).
Here's a comparison between how it is now, and how it could be when fixed. Having hard edges around the image makes UI look crispier.
Feathered edges (current state):
<img width="584" alt="Screenshot 2023-07-11 at 14 36 36" src="https://github.com/vercel/next.js/assets/28541613/1cbfbd69-23b2-4c1e-bb47-c19b8cd510ce">
Hard edges (expected):
<img width="584" alt="Screenshot 2023-07-11 at 14 36 47" src="https://github.com/vercel/next.js/assets/28541613/f09e9335-9c1b-469b-80aa-dc5d3205b0b9">
### 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/52548 | https://github.com/vercel/next.js/pull/52583 | d0cbf359dd3c3c60a71f00f04fc84daa4f3445b1 | 7160af3dbad82cb318153df70699a764751c199c | "2023-07-11T12:44:21Z" | javascript | "2023-07-26T01:45:24Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,533 | ["packages/next/src/lib/create-client-router-filter.ts", "packages/next/src/shared/lib/router/utils/is-dynamic.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-siblings/@modal/(.)[id]/page.js", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-siblings/@modal/default.js", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-siblings/[id]/page.js", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-siblings/layout.js", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-siblings/page.js", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"] | Intercepting parallel routes including dynamic route not working within the same directory | ### 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.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64
Binaries:
Node: 18.16.1
npm: 9.8.0
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 13.4.10-canary.3
eslint-config-next: 13.4.9
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/zoogeny/next-js-interceptor-parallel-dynamic
### To Reproduce
Checkout, install the project and run the dev server
```bash
git checkout https://github.com/zoogeny/next-js-interceptor-parallel-dynamic.git
cd next-js-interceptor-parallel-dynamic
npm install
npm run dev
```
Load a page in the blog (e.g. http://localhost:3000/blog/first-post) and you will see a basic interface:
```
params.slug: first-post
Same dir
Nested dir
```
If you click the `Nested dir` link you will correctly get a parallel slot rendered below the links with a red border. If you click within the border the slot will be removed.
If you click the `Same dir` link you will navigate the entire page. This is not expected - it should be intercepted and render inside the parallel slot.
### Describe the Bug
It appears that interception of routes within the same directory does not work. e.g. I have a directory structure as follows:
```
app
/blog
/[slug]
page.tsx
/@modal
/(.)[slug]
page.tsx
/(.)summary
/[slug]
page.tsx
default.tsx
layout.tsx
page.tsx
```
While I am on the `blog/some-page` page I _can_ intercept `<Link>` to `blog/summary/another-page` but I _cannot_ intercept `<Link>` to `blog/another-page`.
### Expected Behavior
When on a page `blog/some-page` I would expect to be able to intercept `<Link>` to `blog/another-page` using a folder at `blog/@modal/(.)[slug]`.
The purpose of this is to show summary modals for blog entries without navigating away from the current page.
### 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/52533 | https://github.com/vercel/next.js/pull/58198 | a6a8c8422ccaddb2c1cf31533df3ecca4b03bcad | 536d2dbc4451f26c0fa51deb1439e8ef08d021fe | "2023-07-11T03:39:02Z" | javascript | "2023-11-08T18:57:57Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,381 | ["packages/next/src/client/components/app-router.tsx"] | Link is truncated in the middle | ### 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: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 18.16.1
npm: 9.5.1
Yarn: 1.22.17
pnpm: 8.6.5
Relevant Packages:
next: 13.4.9
eslint-config-next: 13.4.7
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: export
```
### Which example does this report relate to?
with-static-export
### What browser are you using? (if relevant)
Brave: 1.52.122 Chromium: 114.0.5735.110
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
I have encountered an issue with the `Link` component where the link path is getting cut in the middle. For example, when using the following link: `<Link href="/client/uuid/coaching-guide" />`, it redirects to `/client/uuid/coaching-`, resulting in a 404 error. Similar to this: https://github.com/vercel/next.js/issues/48996#issuecomment-1612270534
### Expected Behavior
Expect it to go to "/client/uuid/coaching-guide"
### To Reproduce
`next.config.js`
```
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
output: 'export',
};
module.exports = nextConfig;
```
1. Execute [create-next-app](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io/) to bootstrap the example:
```shell
npx create-next-app --example with-static-export with-static-export-app
```
2. Serve site via npx serve@latest out
<sub>[NEXT-1415](https://linear.app/vercel/issue/NEXT-1415/link-is-truncated-in-the-middle)</sub> | https://github.com/vercel/next.js/issues/52381 | https://github.com/vercel/next.js/pull/52640 | 6b2aed12d70d0e745b8ab0a2ae7a23ac338b7f56 | 539ae6c1fc39293633d0835afb73e483d2c2f7ed | "2023-07-07T10:31:43Z" | javascript | "2023-07-17T09:29:24Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,366 | ["packages/next/src/server/config-utils.ts", "packages/next/src/server/config.ts", "packages/next/src/server/lib/server-ipc/index.ts", "packages/next/src/server/next-server.ts", "test/e2e/app-dir/next-config/app/layout.js", "test/e2e/app-dir/next-config/app/page.js", "test/e2e/app-dir/next-config/index.test.ts", "test/e2e/app-dir/next-config/next.config.js"] | Nextjs 13.4.9 - Error: Cannot find module 'webpack' | ### 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: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 18.16.1
npm: 9.5.1
Yarn: 1.22.19
pnpm: 8.6.6
Relevant Packages:
next: 13.4.9-canary.3
eslint-config-next: 13.4.9
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### 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/alifa20/next-js-demo/pull/1
### To Reproduce
- Git pull the repo
- yarn && yarn dev
- Try browsing localhost:3000
- The error will come up in the console
### Describe the Bug
I have a suspicion that this issue may be related to the following GitHub links:
- https://github.com/vercel/next.js/issues/21679
- https://github.com/shadowwalker/next-pwa/issues/151
🤷♂️ **¯\\_(ツ)_/¯**
It's unclear at the moment, so I'm not entirely certain.
However, the older version, v13.4.8, seems to be functioning properly.
### Expected Behavior
Localhost:3000 should come up.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1434](https://linear.app/vercel/issue/NEXT-1434/nextjs-1349-error-cannot-find-module-webpack)</sub> | https://github.com/vercel/next.js/issues/52366 | https://github.com/vercel/next.js/pull/52587 | 38dafa1609de1a1b1436d6a966d82a8c0dc1bff7 | b7e2627422e0bfa73fde2d3e0ec6b438c8df416b | "2023-07-07T00:40:58Z" | javascript | "2023-07-12T11:21:05Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,365 | ["packages/eslint-config-next/package.json", "pnpm-lock.yaml"] | Nextjs 13.4.9 - ESLint couldn't determine the plugin "react-hooks" uniquely. | ### 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: #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2
Binaries:
Node: 18.16.0
npm: 9.5.1
Yarn: N/A
pnpm: 8.6.6
Relevant Packages:
next: 13.4.9
eslint-config-next: 13.4.9
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
ESLint (eslint-config-next)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/belgattitude/artist/pull/7
### To Reproduce
See https://github.com/belgattitude/artist/pull/7 and https://github.com/belgattitude/artist/actions/runs/5480794201/jobs/9984365681?pr=7
```bash
git clone -b nextjs-reprod-eslint-react-hooks --single-branch https://github.com/belgattitude/artist.git
cd artist
corepack enable && pnpm install
cd apps/web
pnpm lint
```

```bash
pnpm why -r eslint-plugin-react-hooks
```
```
artist-monorepo /home/sebastien/github/artist
devDependencies:
@belgattitude/eslint-config-bases 1.35.1
└── eslint-plugin-react-hooks 4.6.0
[email protected] /home/sebastien/github/artist/apps/web
devDependencies:
@belgattitude/eslint-config-bases 1.35.1
└── eslint-plugin-react-hooks 4.6.0
eslint-config-next 13.4.9
└── eslint-plugin-react-hooks 5.0.0-canary-7118f5dd7-20230705
[email protected] /home/sebastien/github/artist/packages/strapi-api
devDependencies:
@belgattitude/eslint-config-bases 1.35.1
└── eslint-plugin-react-hooks 4.6.0
```
### Describe the Bug
Since https://github.com/vercel/next.js/pull/52275, projects using a custom eslint configuration might run into `Nextjs 13.4.9 - ESLint couldn't determine the plugin "react-hooks" uniquely.`
Based on the reproduction PR above, see an example
- https://github.com/belgattitude/artist/blob/main/apps/web/.eslintrc.js
- it uses https://github.com/belgattitude/shared-dx/tree/main/packages/eslint-config-bases
In that case there will be 2 versions installed (with pnpm at least)
devDependencies:
@belgattitude/eslint-config-bases 1.35.1
└── eslint-plugin-react-hooks 4.6.0
eslint-config-next 13.4.9
└── eslint-plugin-react-hooks 5.0.0-canary-7118f5dd7-20230705
Which leads to `ESLint couldn't determine the plugin "react-hooks" uniquely.`
As a workaround:
```json
"resolutions": {
"eslint-plugin-react-hooks": "4.6.0"
},
```
### Expected Behavior
Imho, eslint-plugin-next should allow usage of customized/shared eslint-config. Using a canary: eslint-plugin-react-hooks 5.0.0-canary-7118f5dd7-20230705 makes the setup slightly more difficult for some advanced usages.
PS: Tested with pnpm 8.6.6 and yarn 4.0.0-rc.48 but I guess other variant will fail to as it's different major version.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1476](https://linear.app/vercel/issue/NEXT-1476/nextjs-1349-eslint-couldnt-determine-the-plugin-react-hooks-uniquely)</sub> | https://github.com/vercel/next.js/issues/52365 | https://github.com/vercel/next.js/pull/53751 | e20c8c824c9dc8cfde3d4b6eb6c3c7bd2fd2c081 | 71149293e59bbc1c285def10a51276da64b6c4ca | "2023-07-06T23:29:06Z" | javascript | "2023-08-17T18:39:03Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,239 | ["packages/next/src/server/config-schema.ts", "packages/next/src/server/config-shared.ts", "packages/next/src/server/next-server.ts", "test/e2e/app-dir/app-static/app-fetch-logging.test.ts", "test/e2e/app-dir/app-static/next.config.js"] | Requests logs shows incomplete, unhelpful URLs | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```bash
yarn run v1.22.19
$ /Users/raphael/code/billiv/billiv-frontend/node_modules/.bin/next info
Operating System:
Platform: darwin
Arch: x64
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.16.0
npm: 9.5.1
Yarn: 1.22.19
pnpm: 7.25.1
Relevant packages:
next: 13.4.2
eslint-config-next: 13.3.1
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.9-canary.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
✨ Done in 2.57s.
```
### 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/raphaelbadia/nextjs-appdir-truncates-logs
### To Reproduce
Use fetchs with long URLS, such as
```
export default async function Home() {
await fetch(
"https://jsonplaceholder.typicode.com/posts/1/comments?url=too_long&truncated=unfortunately_yes"
);
await fetch(
"https://jsonplaceholder.typicode.com/posts/1/comments?url=too_long&hello=false&truncated=unfortunately_yes"
);
return null;
}
```
### Describe the Bug
When I use fetch, the requests are logged in the terminal.
This is a great idea, but they are truncated and I can't differentiate them:

Here I don't understand why my edge config gets called twice, is it the same call? I can't know.
Same for my 6s slow request, In my code I have two different queries but I don't know which one is which.
### Expected Behavior
I'd like to be able to see the full URL in the terminal.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1604](https://linear.app/vercel/issue/NEXT-1604/requests-logs-shows-incomplete-unhelpful-urls)</sub> | https://github.com/vercel/next.js/issues/52239 | https://github.com/vercel/next.js/pull/55111 | 904d8eed3958be3a0c4167a858f06029aac42c65 | 8076d0c68a327869b088559587565708c75f7b71 | "2023-07-05T09:44:49Z" | javascript | "2023-09-07T23:58:09Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,191 | ["packages/next/src/lib/metadata/resolve-metadata.test.ts", "packages/next/src/lib/metadata/resolve-metadata.ts", "packages/next/src/lib/metadata/types/twitter-types.ts"] | Instant Crash On 13.4.8 | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```bash
Instant crash as soon as opening a route since the latest Next version (13.4.8), any idea where this is coming from and how to get around it? Didn't happen before the latest release.
```
### 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 or a replay of the bug
N/A
### To Reproduce
Using the app directory with a variety of routes & dynamic metadata.
### Describe the Bug
**Unhandled Runtime Error**
Error: Cannot read properties of undefined (reading 'absolute')
**postProcessMetadata**
/.../Monorepo/Web/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/lib/metadata/resolve-metadata.js (276:69)
**accumulateMetadata**
/.../Monorepo/Web/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/lib/metadata/resolve-metadata.js (362:12)
MetadataTree
/.../Monorepo/Web/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/lib/metadata/metadata.js (34:68)
### Expected Behavior
No crash, like on 13.4.7
### Which browser are you using? (if relevant)
Any
### How are you deploying your application? (if relevant)
Localhost
<sub>[NEXT-1397](https://linear.app/vercel/issue/NEXT-1397/instant-crash-on-1348)</sub> | https://github.com/vercel/next.js/issues/52191 | https://github.com/vercel/next.js/pull/52196 | 0b470753b7b2df4bc10abbf0453888d79e321e02 | baf3d2fa8a424554f4fe2d6e05dcac1a1ca52c60 | "2023-07-04T10:57:29Z" | javascript | "2023-07-05T11:05:33Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,116 | ["packages/next/src/client/image-component.tsx", "packages/next/src/shared/lib/get-img-props.ts", "packages/next/src/shared/lib/image-external.tsx", "test/integration/next-image-new/loader-config/pages/get-img-props.js", "test/integration/next-image-new/loader-config/test/index.test.ts", "test/integration/next-image-new/unoptimized/pages/get-img-props.js", "test/integration/next-image-new/unoptimized/test/index.test.ts"] | unstable_getImgProps external Image 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: linux
Arch: x64
Version: Ubuntu 20.04.0 LTS Mon Jul 03 2023 07:29:29 GMT+0200 (Central European Summer Time)
Binaries:
Node: 16.20.0
npm: 9.4.2
Yarn: 1.22.19
pnpm: 8.6.3
Relevant Packages:
next: 13.4.8-canary.14
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: N/A
Next.js Config:
output: N/A
```
### Which example does this report relate to?
https://stackblitz.com/edit/nextjs-ogjsy9?file=next.config.js,pages%2Findex.js
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Hello, thank you for finding a solution to this [problem](https://github.com/vercel/next.js/discussions/25393#discussioncomment-6310618).
We tried with external images, but we get the following error message.
"Invalid src prop (imagePath) on `next/image`, hostname "images.unsplash.com" is not configured under images in your `next.config.js`.
See more information: https://nextjs.org/docs/messages/next-image-unconfigured-host"
An example can be found [here](https://stackblitz.com/edit/nextjs-ogjsy9?file=next.config.js,pages%2Findex.js):
The next.config.js contains the external image domains and the default `<Image />` component works.
Is there a problem or are we missing something in the configuration?
### Expected Behavior
- external image Url is resolved
### To Reproduce
- select 13.4.8-canary.14
- start application
- URL of the image cannot be resolved
<sub>[NEXT-1374](https://linear.app/vercel/issue/NEXT-1374/unstable-getimgprops-external-image-url)</sub> | https://github.com/vercel/next.js/issues/52116 | https://github.com/vercel/next.js/pull/52153 | b4b98e84d96a103eb4fc434faa78ffec3b220949 | e17218fcba36ef148797dfefd5147e01cb29843b | "2023-07-03T05:32:17Z" | javascript | "2023-07-03T23:56:36Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,077 | ["docs/02-app/01-building-your-application/03-data-fetching/index.mdx"] | Docs: Conflicting info about POST deduping? | ### What is the improvement or update you wish to see?
At one place it [says](https://nextjs.org/docs/app/building-your-application/data-fetching#automatic-fetch-request-deduping):
> POST requests are not automatically deduplicated
At [another](https://nextjs.org/docs/app/building-your-application/data-fetching/caching#post-requests-and-cache):
> POST requests are automatically deduplicated when using fetch – unless they are inside of POST Route Handler or come after reading headers()/cookies()
These two seem to somewhat contradict, no? Or at least I would have written the first so that it is more aligned with the second.
### Is there any context that might help us understand?
N/A
### Does the docs page already exist? Please link to it.
See links above.
<sub>[DX-1753](https://linear.app/vercel/issue/DX-1753/docs-conflicting-info-about-post-deduping)</sub> | https://github.com/vercel/next.js/issues/52077 | https://github.com/vercel/next.js/pull/52100 | ef6cb4c9544b9873f250d388a7c847cfa320ace6 | ea000d1028c79b14425f6c1b8da745b68935b40f | "2023-07-01T18:17:12Z" | javascript | "2023-07-09T22:55:15Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,047 | ["docs/02-app/01-building-your-application/01-routing/08-parallel-routes.mdx"] | Docs: Missing typescript types for props in Conditionnal Routes example | ### What is the improvement or update you wish to see?
There are missing types in the example on conditionnal routes in the docs even though there is a switch to toggle between the TS and JS versions
### Is there any context that might help us understand?
N/A
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#conditional-routes | https://github.com/vercel/next.js/issues/52047 | https://github.com/vercel/next.js/pull/52076 | cc04b62f61e951962e194d18e7db8aa35d31eba3 | 9db91ebfa04d2ebf58f58ebd1ec2c26b46b8341a | "2023-06-30T16:52:55Z" | javascript | "2023-07-01T20:15:15Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 52,002 | ["packages/next/src/build/webpack/loaders/next-metadata-image-loader.ts", "test/e2e/app-dir/metadata/metadata.test.ts"] | [NEXT-1332] App Router: Chromium browsers prefer favicon.ico over icon.svg | ### 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.6.0: Wed Jun 7 17:29:47 PDT 2023; root:xnu-8796.140.23.0.2~38/RELEASE_X86_64
Binaries:
Node: 20.3.1
npm: 9.6.7
Yarn: 3.5.1
pnpm: 8.6.5
Relevant Packages:
next: 13.4.8-canary.11
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: standalone
warn - Latest canary version not detected, detected: "13.4.8-canary.11", newest: "13.4.8-canary.9".
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)
Metadata (metadata, generateMetadata, next/head, head.js)
### Link to the code that reproduces this issue or a replay of the bug
[https://github.com/seidior/next-favicon-issue](https://github.com/seidior/next-favicon-issue)
### To Reproduce
Environment setup:
```
pnpm install
pnpm run dev
```
Then, open a new (Chromium-based) web browser window in private mode. Use the Web Inspector to disable your browser's cache via the "Network" tab. Then navigate to [http://localhost:3000](http://localhost:3000) in this window.
With the "Network" tab in Web Inspector open, observe that `favicon.ico` is retrieved, but `icon.svg` is not, even though both appear in the `<head>` of the page:

### Describe the Bug
With Next.js 13.4 (stable or canary) set up to use App Router, when both `/app/favicon.ico` and `/app/icon.svg` are present, Chromium-based browsers (Google Chrome and Vivaldi were tested) do not use the SVG-based favorites icon and opt only to download the favorites icon in Windows Icon (.ico) format. This is following [the metadata documentation](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons).
In my attached test case, the following output is generated in the `<head>` section of the page:
```
<link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="any"/>
<link rel="icon" href="/icon.svg?2e107c23de4929db" type="image/svg+xml" sizes="32x32"/>
```
However, this does not conform to [best practices](https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs) nor to [the HTML spec](https://html.spec.whatwg.org/#rel-icon).
* The HTML specification suggests using `sizes="any"` for SVG icons.
* Best practices suggest omitting the "sizes" attribute for SVG icons.
However, Next.js — as seen above — specifies the "sizes" attribute with the value chosen from the `viewBox` from the SVG image. (This issue presents no matter if the "height" and "width" attributes are specified for the SVG image.)
This causes an issue with Chromium-based browsers, which will not choose the SVG icon over the favorites icon if "sizes" is specified with pixel values for the SVG icon.
This issue appears regardless of whether or not standalone is specified and whether or not Next.js is running in dev mode or built as a standalone app.
### Expected Behavior
When given an SVG-based favorites icon, Next.js should use one of the above methods (either `sizes="any"` or no "sizes" attribute) so these Chromium-based browsers will use the SVG icon regardless of any other icons specified. It should disregard any sizing information provided by the SVG.
### Which browser are you using? (if relevant)
Google Chrome 114.0.5735.198 (Official Build) (x86_64)
### How are you deploying your application? (if relevant)
dev environment / standalone
<sub>From [SyncLinear.com](https://synclinear.com) | [NEXT-1332](https://linear.app/vercel/issue/NEXT-1332/app-router-chromium-browsers-prefer-faviconico-over-iconsvg)</sub> | https://github.com/vercel/next.js/issues/52002 | https://github.com/vercel/next.js/pull/52609 | 4c4bee7112a8b8fa28e8efc5560094e6fa24801f | 76eec86a6b08c6bdf43b03202b32c351597ce5c6 | "2023-06-29T20:20:42Z" | javascript | "2023-07-13T00:33:27Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,951 | ["packages/next/src/build/webpack/loaders/next-app-loader.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-no-page/foo/@parallel/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/parallel-no-page/foo/layout.tsx", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"] | [NEXT-1337] Parallel routes keep refreshing in DEV in next 13.4.7 | ### 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: Thu Jun 8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103
Binaries:
Node: 18.16.0
npm: 9.5.1
Yarn: 1.22.19
pnpm: 8.6.2
Relevant Packages:
next: 13.4.8-canary.8
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.4
Next.js Config:
output: N/A
```
### 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/Fredkiss3/infinite-reload-parallel-routes-bug
### To Reproduce
1. Run the DEV server and go to `http://localhost:3000`
2. Watch as the color of the text keep changing every couple of seconds
### Describe the Bug
In the latest version of next (`13.4.7`) and even on the latest canary, when we use parallel routes, they get refreshed every couple of seconds without doing any action in DEV, i've noticed that everytime the websocket used by next for HMR does does a ping, next refresh the page and the server code is reexecuted.
I've tested with the previous version (`13.4.6`) and it worked fine.
### Expected Behavior
The parallel route should not refresh every couple of seconds.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1337](https://linear.app/vercel/issue/NEXT-1337/parallel-routes-keep-refreshing-in-dev-in-next-1347)</sub> | https://github.com/vercel/next.js/issues/51951 | https://github.com/vercel/next.js/pull/52061 | 9e4b87d502e1e20351e111d92e70b2e54ac0351a | 0b87ba29c4546268cac65632cf09a23dbec5486d | "2023-06-28T23:03:46Z" | javascript | "2023-07-04T10:37:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,938 | ["docs/01-getting-started/01-installation.mdx", "docs/01-getting-started/02-project-structure.mdx"] | Docs: How to Shift from Page.js and layout.js in app directory to index.js and _app.js in pages directory | ### What is the improvement or update you wish to see?
Update in Docs for setting up of NextJS project and what folders to create at starting stages of your project and what pages I can create and what I can remove. @shuding
### Is there any context that might help us understand?
Recently I started building a Website using NextJS, but after setting up the project, I was provided with page.js and layout.js. There are instructions in the docs that I can also use _app.js and index.js inside Pages folder but it is not clear how. I created Index.js inside Pages folder, but that created an error showing "you can either use page.js or index.js", this should be mentioned in the docs and also after going through different projects of developers in Github, I came to understand I can remove layout.js and use only _app.js inside Pages folder, this should also be clearly mentioned in the docs. This will help a lot of new developers like me who are using NextJS for the first time.
### Does the docs page already exist? Please link to it.
_No response_
<sub>[DX-1714](https://linear.app/vercel/issue/DX-1714/docs-how-to-shift-from-pagejs-and-layoutjs-in-app-directory-to-indexjs)</sub> | https://github.com/vercel/next.js/issues/51938 | https://github.com/vercel/next.js/pull/51995 | ec195371279c1f612683aa79f0c4e107b0d0070b | 931b1b5d87b7e5553840e2ddb031548ea5c16b5f | "2023-06-28T15:52:52Z" | javascript | "2023-07-06T15:06:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,907 | ["packages/next/src/build/webpack/plugins/next-types-plugin.ts"] | Property `ref` does not exist on `<Link>` component when `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: 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.8-canary.6
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.5
Next.js Config:
output: N/A
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
Routing (next/router, next/navigation, next/link), TypeScript (plugin, built-in types)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/mateuszaliyev/next-typed-routes-link-ref
### To Reproduce
1. Clone the repository
2. Install dependencies (`npm install`)
3. Run development server so TypeScript plugin can generate types (`npm run dev`)
4. Run `npx tsc` or check the `/app/page.tsx` file to see the type error
### Describe the Bug
Property `ref` does not exist on `<Link>` component when `experimental.typedRoutes = true`.
```
$ npx tsc
app/page.tsx:10:20 - error TS2322: Type '{ children: string; href: "/"; ref: MutableRefObject<HTMLAnchorElement>; }' is not assignable to type 'IntrinsicAttributes & LinkRestProps & { href: UrlObject | RouteImpl<"/">; }'.
Property 'ref' does not exist on type 'IntrinsicAttributes & LinkRestProps & { href: UrlObject | RouteImpl<"/">; }'. Did you mean 'href'?
10 <Link href="/" ref={ref}>
~~~
Found 1 error in app/page.tsx:10
```

### Expected Behavior
Property `ref` should exist on `<Link>` component regardless of the `experimental.typedRoutes` setting.
### 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/51907 | https://github.com/vercel/next.js/pull/51977 | 7c5eb3191e656a29b48ae7926171079937ff9fc2 | c897933b6eee33ac9b495087b05e17582971cb69 | "2023-06-27T21:49:42Z" | javascript | "2023-06-29T12:24:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,872 | ["packages/next/src/server/config.ts"] | Canary version breaks @mui/material based project | ### 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: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 18.15.0
npm: 7.24.2
Yarn: 1.22.19
pnpm: 7.30.3
Relevant packages:
next: 13.4.8-canary.5
eslint-config-next: 12.3.4
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)
_No response_
### Link to the code that reproduces this issue or a replay of the bug
n/a
### To Reproduce
Create a project which uses `@mui/material` e.g. a component like below, with the dependencies:
- "@mui/material": "^5.10.15",
```
/* eslint-disable react/no-unstable-nested-components */
import { Box, useMediaQuery, useTheme } from '@mui/material'
import React, { PropsWithChildren } from 'react'
export function PageLayout({ children }: PropsWithChildren<{}>) {
const theme = useTheme()
const isSmUp = useMediaQuery(theme.breakpoints.up('sm'))
return (
<>
<Box
sx={
isSmUp
? {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
}
: {
display: 'flex',
flexDirection: 'column',
flex: 1,
alignItems: 'center',
backgroundColor: 'common.white',
}
}
>
{children}
</Box>
</>
)
}
```
### Describe the Bug
When you upgrade to the canary version and have an existing project that uses `@material/ui` the build step breaks with the following error:
```
./src/Layouts/PageLayout.tsx
Module not found: Can't resolve '@mui/material/useTheme'
https://nextjs.org/docs/messages/module-not-found
```
### Expected Behavior
Able to compile existing code without new build 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/51872 | https://github.com/vercel/next.js/pull/51953 | f4b947fb5606765e637d89ccd26d43b71cc72b36 | 60d27380f7458ec84aa4627568a54910e62db5b5 | "2023-06-27T11:04:52Z" | javascript | "2023-06-29T03:26:04Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,841 | ["docs/02-app/02-api-reference/05-next-config-js/reactStrictMode.mdx"] | Docs strongly suggest enabling config reactStrictMode | ### What is the improvement or update you wish to see?
Currently reactStrictMode is automatically enabled with the app router and the create-next-app does not enable reactStrictMode in the next.config.js because it's automatically enabled. The docs should state that it's only necessary to enable reactStrictMode when not using the app router.
### Is there any context that might help us understand?
I previously filed #51838 after reading the docs which was immediately closed for good reason.
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/pages/api-reference/next-config-js/reactStrictMode | https://github.com/vercel/next.js/issues/51841 | https://github.com/vercel/next.js/pull/51931 | 60d27380f7458ec84aa4627568a54910e62db5b5 | 3dcaf922de907bac1598939e95a034555e57e512 | "2023-06-26T18:08:23Z" | javascript | "2023-06-29T03:48:29Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,829 | ["packages/next/src/lib/metadata/resolve-metadata.test.ts", "packages/next/src/lib/metadata/resolve-metadata.ts", "packages/next/src/lib/metadata/resolvers/resolve-basics.ts", "packages/next/src/lib/metadata/resolvers/resolve-opengraph.ts", "packages/next/src/lib/metadata/resolvers/resolve-url.ts", "packages/next/src/lib/metadata/types/resolvers.ts", "test/e2e/app-dir/metadata/app/metadata-base/url-instance/page.tsx", "test/e2e/app-dir/metadata/metadata.test.ts"] | setting `./` as `openGraph.url` should work exactly like `alternates.canonical` | ### 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: #202304232030 SMP PREEMPT_DYNAMIC Sun Apr 23 20:37:49 UTC 2023
Binaries:
Node: 18.16.0
npm: 9.5.1
Yarn: 1.22.19
pnpm: 8.6.3
Relevant Packages:
next: 13.4.8-canary.3
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
```
### 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 or a replay of the bug
https://github.com/stefanprobst/issue-next-metadata-urls
### To Reproduce
- `git clone [email protected]:stefanprobst/issue-next-metadata-urls`
- `cd issue-next-metadata-urls`
- `pnpm install && pnpm build && pnpm start`
- go to http://localhost:3000/about and inspect `<head>` in browser devtools
- you should see:
```html
<link rel="canonical" href="http://localhost:3000/about">
<meta property="og:url" content="http://localhost:3000/" />
```
### Describe the Bug
with the following `metadata` config in a layout component in `/app/layout.tsx` i would expect both `<link rel="canonical"/>` and `<meta property="og:url" />` to generate the same `href`.
however, only `alternates.canonical` resolves `./` to the current pathname in a page component, while `openGraph.url` does not.
```ts
export const metadata: Metadata = {
metadataBase: new URL('http://localhost:3000'),
alternates: {
canonical: './'
},
openGraph: {
url: './'
}
}
```
### Expected Behavior
`openGraph.url` should resolve `./` to the current page's pathname when `metadataBase` is set, just like `alternates.canonical` does
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
link NEXT-1302 | https://github.com/vercel/next.js/issues/51829 | https://github.com/vercel/next.js/pull/51877 | a54d08bd508f365337fda5caaf9f63f8ae57e725 | a04a34d3b780a02ca19ba9de8ec462044827e830 | "2023-06-26T14:36:09Z" | javascript | "2023-06-27T17:01:49Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,784 | ["packages/next/src/lib/generate-interception-routes-rewrites.ts", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-routes-dynamic-catchall/photos/(.)catchall/[...id]/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-routes-dynamic-catchall/photos/(.)optional-catchall/[[...id]]/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-routes-dynamic-catchall/photos/catchall/[id]/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-routes-dynamic-catchall/photos/optional-catchall/[[...id]]/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-routes-dynamic-catchall/photos/page.tsx", "test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts"] | Intercepting Routes with Catch-all Segments broken | ### 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.16.0
npm: 9.5.1
Yarn: N/A
pnpm: 8.6.3
Relevant Packages:
next: 13.4.8-canary.2
eslint-config-next: 13.4.7
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
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 or a replay of the bug
https://github.com/vercel-labs/nextgram
### To Reproduce
It looks as though the pathing is broken when trying to use Catch-all Segments with Intercepting routes.
- **works**: `/(.)photo/[id]`
- **breaks**: `/(.)photo/[...id]`
### Describe the Bug
The error that I receive is:
```sh
/node_modules/next/dist/compiled/path-to-regexp/index.js:47
throw new TypeError("Missing parameter name at " + i);
TypeError: Missing parameter name at 9
at lexer (/next/dist/compiled/path-to-regexp/index.js:47:23)
at parse (/next/dist/compiled/path-to-regexp/index.js:97:18)
at stringToRegexp (/next/dist/compiled/path-to-regexp/index.js:329:27)
at pathToRegexp (/next/dist/compiled/path-to-regexp/index.js:403:12)
at getPathMatch (/next/dist/shared/lib/router/utils/path-match.js:14:51)
at getCustomRoute (/next/dist/server/server-route-utils.js:40:47)
at buildRewrite (/next/dist/server/next-server.js:1408:75)
at /next/dist/server/next-server.js:1476:79
at Array.map (<anonymous>)
at DevServer.generateRewrites (/next/dist/server/next-server.js:1476:70)
at Watchpack.<anonymous> (/next/dist/server/dev/next-dev-server.js:576:50)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
```
*note: I've shortened the paths to node_modules above*
### Expected Behavior
I'd expect this intercepting routes to work properly with catch-all segments
### 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/51784 | https://github.com/vercel/next.js/pull/51787 | 6d0d5e313b5238dcc188cf86fd130dc933527605 | 1b804c05297d9bba13934e509cd3ef3bdff3ebb6 | "2023-06-25T13:25:47Z" | javascript | "2023-06-25T21:02:10Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,763 | ["packages/next/src/build/webpack/loaders/next-app-loader.ts", "test/e2e/app-dir/app-compilation/app/layout.js", "test/e2e/app-dir/app-compilation/app/page-with-loading/loading.js", "test/e2e/app-dir/app-compilation/app/page-with-loading/page.js", "test/e2e/app-dir/app-compilation/index.test.ts", "test/e2e/app-dir/app-compilation/next.config.js"] | Trying to compile deleted loading.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: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 20.1.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.4.8-canary.2
eslint-config-next: 13.4.6
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
```
### 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
works on a fresh build of nextJS canary
### To Reproduce
1. Init NextJS in the folder
2. Create any nested route (e.g. /app/dashboard)
3. Create loading.tsx
4. Load page in your browser
5. Delete loading .tsx
### Describe the Bug
The bug is that when i am deleting 'loading.tsx' it still tries to load it and show that error, even if i am reopening the server:
> ./src/app/dashboard/loading.tsx
> Error: Failed to read source code from C:\Users\ **** \repos\nextjs-app\src\app\dashboard\loading.tsx
> Caused by:
> The system cannot find the file specified. (os error 2)
**The error disappears when i am reinstalling nextjs**
### Expected Behavior
I want Nextjs not to show error when i am deleting 'loading.tsx'
### Which browser are you using? (if relevant)
Chrome 114.0.5735.134
### How are you deploying your application? (if relevant)
yarn dev on my PC | https://github.com/vercel/next.js/issues/51763 | https://github.com/vercel/next.js/pull/51778 | 5e36c349925ddf71ab48ef44e3d713ddc5afc883 | 869aeb40ce3d8003ed43eab9257e47b35d68645d | "2023-06-24T22:19:38Z" | javascript | "2023-06-25T19:26:09Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,721 | ["packages/next/src/client/components/layout-router.tsx", "packages/next/src/shared/lib/router/router.ts", "packages/next/src/shared/lib/router/utils/handle-smooth-scroll.ts"] | App Router: Next/Link does not respect smooth scroll | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```bash
codesandbox on [email protected]
```
### 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 or a replay of the bug
https://codesandbox.io/p/sandbox/boring-carson-rhrf23?file=%2Fapp%2Flayout.tsx%3A9%2C1
### To Reproduce
Use the two different navbars to see smooth scroll difference between Next/Link and normal anchor tag.
### Describe the Bug
Next/Link does not scroll smoothly
### Expected Behavior
Next/Link should scroll smoothly
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1406](https://linear.app/vercel/issue/NEXT-1406/app-router-nextlink-does-not-respect-smooth-scroll)</sub> | https://github.com/vercel/next.js/issues/51721 | https://github.com/vercel/next.js/pull/52915 | 4994a428ae5beeeb5e0ece1d791458a5ab1c41b2 | 8664ffe26dafd7529d5fc674294c0f53709d51c3 | "2023-06-23T20:00:06Z" | javascript | "2023-07-20T06:13:04Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,692 | ["packages/next/src/build/utils.ts", "packages/next/src/shared/lib/page-path/denormalize-app-path.ts", "test/e2e/app-dir/build-size/app/foo/page.tsx", "test/e2e/app-dir/build-size/app/layout.tsx", "test/e2e/app-dir/build-size/app/page.tsx", "test/e2e/app-dir/build-size/index.test.ts", "test/e2e/app-dir/build-size/styles/index.module.css"] | [NEXT-1306] next.js build undereports bundle size by one megabyte | ### 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.16.0
npm: 9.5.1
Yarn: 1.22.19
pnpm: 7.29.3
Relevant packages:
next: 13.4.8-canary.1
eslint-config-next: 13.4.7
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 or a replay of the bug
https://github.com/JLarky/slides/tree/bug--app-dir-build-bug/2023-07-rscs/demos/next-app
### To Reproduce
```
yarn && yarn build
```
you'll see ~100kb bundle
```
yarn start
```
open website and you'll see 1mb bundle
```
$ du -sh .next/static/chunks/4201c796-1b6fcb825824e4b0.js
4.3M .next/static/chunks/4201c796-1b6fcb825824e4b0.js
```
```
Route (app) Size First Load JS
─ ○ / 0 B 0 B
+ First Load JS shared by all 77.6 kB
├ chunks/769-37a05f64bbbf2825.js 25.2 kB
├ chunks/bce60fc1-49ee79ad31766ac6.js 50.5 kB
├ chunks/main-app-f68f296e47bc52ec.js 217 B
└ chunks/webpack-57e7153b6eca00f2.js 1.71 kB
Route (pages) Size First Load JS
─ ○ /404 182 B 75.5 kB
+ First Load JS shared by all 75.3 kB
├ chunks/framework-8883d1e9be70c3da.js 45 kB
├ chunks/main-2c4a65eb87b994fa.js 28.4 kB
├ chunks/pages/_app-998b8fceeadee23e.js 195 B
└ chunks/webpack-57e7153b6eca00f2.js 1.71 kB
○ (Static) automatically rendered as static HTML (uses no initial props)
```
### Describe the Bug
build command in App Dir undereports client bundle size
### Expected Behavior
report all chunks that were generated
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1306](https://linear.app/vercel/issue/NEXT-1306/nextjs-build-undereports-bundle-size-by-one-megabyte)</sub> | https://github.com/vercel/next.js/issues/51692 | https://github.com/vercel/next.js/pull/51854 | d06bc5e286f21607289ab24cde279bdfcba0ed00 | aec75c2f061008245967d7bd82de4cba20ad670e | "2023-06-23T06:44:51Z" | javascript | "2023-06-27T01:57:50Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,556 | ["docs/02-app/01-building-your-application/01-routing/02-pages-and-layouts.mdx"] | Docs: Mention that nested inner/nested layouts should not contain `html` or `body` tags in app router | ### What is the improvement or update you wish to see?
Before starting with the app router, I went through the docs. But nowhere it was strictly mentioned that the inner layouts should not contain `html` or `body` tags.
Add a good to know section mentioning that one should not add these tags in nested layouts.
### Is there any context that might help us understand?
Because I had added `html` and `body` in my layouts, page were breaking while navigation. I only realised the error when I gave a closer look at the console. Next.js works without any compiler warnings even if `html` or `body` tags are present in the inner layouts.
To ensure that no one makes the same mistake again and that it acts as a reminder.
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts | https://github.com/vercel/next.js/issues/51556 | https://github.com/vercel/next.js/pull/51558 | 0674d95d2ea23982864813e33a610b0c9a9ac70a | 87bfab44485d9a3303d6e37e3838c88dd7c21adc | "2023-06-20T11:39:55Z" | javascript | "2023-06-21T22:42:43Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,482 | ["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"] | "Error: Cannot read properties of null (reading 'useContext')" in standalone 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: linux
Arch: x64
Version: #82-Ubuntu SMP Tue Jun 6 23:10:23 UTC 2023
Binaries:
Node: 18.16.0
npm: 9.5.1
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.4.7-canary.1
eslint-config-next: 13.4.6
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
N/A
### To Reproduce
Unfortunately I can't share any code - my app is not open source.
I can give some points tho:
1. Not using `next/image` , Image Optimization.
2. Output = "standalone" (makes deployments smaller).
3. As you can see, apparently (somehow) error is happening inside `SWRConfig`. My layout and all providers are wrapped by `SWRConfig`.
4. Using React.Suspense almost everywhere I need suspense. Only 2 components use next/dynamic. Pretty sure these 2 components have no relation to the issue at hand.
### Describe the Bug
While my whole app is working quite flawlessly in NextJs v13.4.5, it broke once I upgraded to v13.4.6. The same error continues in the latest canary.
Following error started to popup across board:
```
TypeError: Cannot read properties of null (reading 'useContext')
at exports.useContext (/var/www/.next/standalone/node_modules/react/cjs/react.production.min.js:24:118)
at SWRConfig (file:///var/www/.next/standalone/node_modules/swr/_internal/dist/index.mjs:519:26)
at Ge (/var/www/.next/standalone/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:114:273)
at Z (/var/www/.next/standalone/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91)
at Ge (/var/www/.next/standalone/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:115:9)
at Z (/var/www/.next/standalone/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91)
at Ge (/var/www/.next/standalone/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:119:95)
at Z (/var/www/.next/standalone/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91)
at Ge (/var/www/.next/standalone/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:115:9)
at Z (/var/www/.next/standalone/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91)
```
This is happening only on `production` and only when I run app via `node server.js` instead of `npm start` (`standalone` output recommends the former). During `npm run dev` or `npm start` everything works fine.
### Expected Behavior
As in v13.4.5, I shouldn't be getting the aforementioned errors which only happen in v13.4.6.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
node start.js (`standalone` output) | https://github.com/vercel/next.js/issues/51482 | https://github.com/vercel/next.js/pull/51506 | c1c3675fc4f62ba61484b29b4e0106b1706264c4 | a0cc4aa65e177fdd52e3224d2630ac8395bf7726 | "2023-06-19T00:14:54Z" | javascript | "2023-06-21T20:15:05Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,332 | ["examples/cms-strapi/README.md"] | strapi example is outdated | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```bash
.
```
### Which example does this report relate to?
cms-strapi
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Strapi released a new Strapi Starter with Next.js (+ App Router), TypeScript and Tailwind https://github.com/strapi/nextjs-corporate-starter
Due to limited bandwidth they archive all the other starters.
> We'd also like to address what this means for older Strapi starters. Due to limited bandwidth, we've decided to support only this new Strapi Starter officially, and all other starters will be archived.
Related blog post from Strapi: https://strapi.io/blog/introducing-the-new-strapi-starter-with-nextjs13-tailwind-and-typescript
### Expected Behavior
.
### To Reproduce
. | https://github.com/vercel/next.js/issues/51332 | https://github.com/vercel/next.js/pull/51334 | 7d7d5a762dc9df2fbae11d6e598695c12cc3428f | 831f58a70ca7b3fb5648398db3a1162f2a4151f9 | "2023-06-15T06:57:24Z" | javascript | "2023-06-15T15:21:48Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,309 | ["packages/next/src/build/webpack-config.ts", "test/e2e/app-dir/app-external/app-external.test.ts", "test/e2e/app-dir/app-external/app/react-server/3rd-party-package/page.js", "test/e2e/app-dir/app-external/node_modules_bak/server-module-field/index.cjs", "test/e2e/app-dir/app-external/node_modules_bak/server-module-field/index.esm.js", "test/e2e/app-dir/app-external/node_modules_bak/server-module-field/package.json"] | 13.4.6-canary.1 broke isomorphic fetch for 3rd party library | ### 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.14.0
npm: 9.3.1
Yarn: 1.22.19
pnpm: 8.6.2
Relevant packages:
next: 13.4.6-canary.2
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)
_No response_
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/khuezy/next-error
### To Reproduce
Reproduction steps also in readme
1. npm install
2. npm run dev
3. Go to [localhost:3000](http://localhost:3000/)
4. Notice error: _libsql_isomorphic_fetch__WEBPACK_IMPORTED_MODULE_0__.Headers is not a constructor
5. Downgrade next from 13.4.6-canary.2 to 13.4.6-canary.0 and rerun npm install
6. Go to [localhost:3000](http://localhost:3000/)
7. Notice there's no error (request will timeout b/c db url is invalid)
### Describe the Bug
Next 13.4.6-canary.1 or 13.4.6-canary.2 introduced a change that prevents libsql client to run due to this error:
```
uncaughtException: Error [TypeError]: _libsql_isomorphic_fetch__WEBPACK_IMPORTED_MODULE_0__.Headers is not a constructor
```
NOTE: This also happens in latest canary.
### Expected Behavior
Next shouldn't break external library usage of isomorphic fetch.
### 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/51309 | https://github.com/vercel/next.js/pull/51316 | 115b6ad953cc2873ab20beb9d71b1b5eaa503950 | 409668107d3adb29c55860527855a2fb4834a770 | "2023-06-14T20:20:03Z" | javascript | "2023-06-14T23:55:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,201 | ["packages/next/src/build/index.ts", "test/integration/with-router/test/index.test.js"] | Degraded pages-directory build performance in `[email protected]` and higher (13.3, 13.4) (2-7x slower) | ### 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: 1.22.19
pnpm: 8.6.0
Relevant packages:
next: 13.4.6-canary.0
eslint-config-next: 13.4.5
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/klaasman/nextjs-build-performance-issue
### To Reproduce
1. Clone repo
2. Run `npm install` - this will install [email protected]
3. Run `rm -rf .next` to remove the build cache (if any)
4. Run `npm run build` - measure the build duration
5. Run `npm install [email protected]`
6. Run `rm -rf .next` to remove the build cache
7. Run `npm run build` - measure the build duration
The second build will/should be significantly slower.
### Describe the Bug
I've ran into significant build performance issues since upgrading next.js from v13.2.4 to v13.3.0 or higher. The build duration of a project I'm working on became easily 2-3x slower after the upgrade. Building on vercel usually takes about 10 minutes, but after the upgrade it was 25-30 minutes.
After a lot of digging I was able to narrow it down to the v13.2.5-canary.26 release.
Luckily, it is easy to reproduce the issue with the attached repo. The repo even shows a 2-**7**x slower build compared to v13.2.4.
#### Steps to reproduce
[This repo](https://github.com/klaasman/nextjs-build-performance-issue) contains a simple next.js project with a pages-directory containing 200 pages (`/pages/number/[number].tsx`) which fake a 1 second delay before rendering the page. Not sure if this is relevant, but it helps to make the issue more visible.
1. Clone this repo
2. Run `npm install` - this will install [email protected]
3. Run `rm -rf .next` to remove the build cache (if any)
4. Run `npm run build` - measure the build duration
5. Run `npm install [email protected]`
6. Run `rm -rf .next` to remove the build cache
7. Run `npm run build` - measure the build duration
The second build will/should be significantly slower.
See below for my results in finding the offending release. Note that I cleared the .next dir after each build.
#### Results
- `0m30s` for `[email protected]`
_~30 seconds is the expected duration_
- `0m31s` for `[email protected]`
- `0m30s` for `[email protected]`
- `0m31s` for `[email protected]`
- `0m31s` for `[email protected]`
- `3m30s` for `[email protected]`
⚠️ _this is where the build duration starts to degrade_ ([[email protected] release notes](https://github.com/vercel/next.js/releases/tag/v13.2.5-canary.26))
- `3m34s` for `[email protected]`
- `3m33s` for `[email protected]`
- `3m23s` for `[email protected]`
_maybe it got fixed somewhere in the v13.3.x range, but 13.3.4 doesnt show any improvement_
- `1m01s` for `[email protected]`
_good improvement in next's latest release(s), but still 2x slower than v13.2.4_
- `1m02s` for `[email protected]`
### Expected Behavior
Pages directory build performance in v13.3.x and higher should not become 2-7x slower compared to [email protected]
### 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/51201 | https://github.com/vercel/next.js/pull/51271 | 862f556c69b05b4c5d5701028818ed5707da3b30 | f676d001b66d1e2d2ef9098ab4f2998e5f10294d | "2023-06-12T20:51:22Z" | javascript | "2023-06-14T06:23:50Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,132 | ["packages/next/src/client/components/react-dev-overlay/hot-reloader-client.tsx", "packages/next/src/client/dev/on-demand-entries-client.ts", "packages/next/src/client/dev/webpack-hot-middleware-client.ts", "packages/next/src/server/dev/on-demand-entry-handler.ts", "packages/next/src/server/lib/router-utils/setup-dev.ts", "packages/next/src/server/next-server.ts", "test/development/app-hmr/hmr.test.ts", "test/development/basic/hmr.test.ts"] | 404 refresh proble | ### 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.14.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.4.5
eslint-config-next: 13.4.5
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 or a replay of the bug
https://github.com/mohammad-taheri1/nextjs-tailwind-sandbox
### To Reproduce
you can check it on any Next.js project
### Describe the Bug
Hi.
I'm seeing a bug that exixts on version 13.4.5. Default 404 page is refreshing infinitively and it can be seen on console. also, if you create a custom not-found.js, the problem still exists.
Only creating a file for catch all with this syntax can solve this problem:
```
[...not-found]
```
### Expected Behavior
not refreshing
### Which browser are you using? (if relevant)
Google chrome
### How are you deploying your application? (if relevant)
npm run dev | https://github.com/vercel/next.js/issues/51132 | https://github.com/vercel/next.js/pull/54406 | fb3f045679c9288d50b85c1062652c664999d06a | 1dffd3c02a87f55c3ef28578302acc8c826b77b1 | "2023-06-11T16:21:03Z" | javascript | "2023-08-23T23:25:57Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,130 | ["packages/next/src/build/webpack/plugins/next-types-plugin/index.ts", "packages/next/src/server/future/route-modules/app-route/module.ts", "test/e2e/app-dir/app-routes/app-custom-routes.test.ts", "test/e2e/app-dir/app-routes/app/no-response/route.ts", "test/e2e/app-dir/app-routes/tsconfig.json"] | Cannot read properties of undefined (reading 'headers') when a route handler doesn't return a response | ### 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:43 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T8112
Binaries:
Node: 20.0.0
npm: 9.6.4
Yarn: 1.22.19
pnpm: 8.6.1
Relevant packages:
next: 13.4.5
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 or a replay of the bug
https://github.com/joulev/debug/tree/nextjs-route-handler-not-return-error-bug
### To Reproduce
Add a route handler that doesn't return a response. For example
```ts
export function POST() {}
```
Run that route handler. For example in the reproduction repository, make a `POST` request to `/api`.
### Describe the Bug
The following error is thrown:
```
- error TypeError: Cannot read properties of undefined (reading 'headers')
at /Users/joulev/dev/www/debug/.next/server/chunks/322.js:3106:61
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
```
It is very unclear and has confused many people in the Next.js Discord server. Of course the error can be fixed by returning a response, but the error is too unclear for developers to know what's wrong.
### Expected Behavior
I think it would be good if this either returns a default 200 response (`new Response(null)` for example) (I prefer this), or throws a clearer error, or both.
### 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/51130 | https://github.com/vercel/next.js/pull/51394 | 6ffb8dafbda66f4a053481c83515ed8f6504005d | f47c40917485bac359df0e3c57d5394a7bcb1e90 | "2023-06-11T14:05:49Z" | javascript | "2023-09-08T03:26:53Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 51,086 | ["packages/next/src/lib/metadata/get-metadata-route.ts"] | [NEXT-1282] Favicon metadata on windows href uses wrong slashes | ### 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.16.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.4.4
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/partridge1307/favicon-error
### To Reproduce
`npm install`
### Describe the Bug
On window seem like favicon has error wrong display path [image](https://github.com/vercel/next.js/assets/94586971/1199cc2c-4f32-4290-a56a-49f12700b2a6) but on Linux it normal here is favicon dir

### Expected Behavior
Show favicon
### Which browser are you using? (if relevant)
Opera GX
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1282](https://linear.app/vercel/issue/NEXT-1282/favicon-metadata-on-windows-href-uses-wrong-slashes)</sub> | https://github.com/vercel/next.js/issues/51086 | https://github.com/vercel/next.js/pull/51088 | d8763ca3475e0cc3662e920e516bbd2fb4893954 | cfd64aab55b6297d554b0d5970c4e10f8a3bf54b | "2023-06-10T08:35:37Z" | javascript | "2023-06-10T23:30:32Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 50,909 | ["packages/next/src/build/entries.ts", "packages/next/src/server/dev/hot-reloader.ts", "packages/next/src/server/dev/on-demand-entry-handler.ts"] | `dev server` warning of a memory leak | ### 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: 20.2.0
npm: 9.6.6
Yarn: 1.22.19
pnpm: 8.5.1
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)
_No response_
### Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/next-memory-leak-reproduction-dev-mode-nvfvrl
### To Reproduce
to reproduce:
1. Visit the reproduction sandbox
2. Open a log tab
3. click in the fire button in the browser tab (to trigger multiple request to different pages simulating high traffic)
4. verify that you receive the following error in the log tab:
```
(node:1491) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 29 unpipe listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
```
### Describe the Bug
This error may validate [other issues with similar problems that have been documented](https://github.com/vercel/next.js/issues/49929) with a posible leak in Next.js. If the leak exists is really problematic form small apps running in some servers with low amount of ram. Its important to say that this error only shows in `dev server` mode.
If its a false alarm also it would need to be removed.
### Expected Behavior
requesting multiple pages in an app should't cause any memory leak
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1431](https://linear.app/vercel/issue/NEXT-1431/dev-server-warning-of-a-memory-leak)</sub> | https://github.com/vercel/next.js/issues/50909 | https://github.com/vercel/next.js/pull/52360 | b8589dfdb02ce5414c00913fae9acf5a323b8ef4 | e50c9180a305a01a313ec182783566af7daa0588 | "2023-06-07T16:07:50Z" | javascript | "2023-07-07T23:08:55Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 50,898 | ["docs/02-app/01-building-your-application/06-configuring/02-eslint.mdx", "errors/no-async-client-component.md", "packages/eslint-plugin-next/src/index.ts", "packages/eslint-plugin-next/src/rules/no-async-client-component.ts", "test/unit/eslint-plugin-next/no-async-client-component.test.ts"] | Using async for a component marks with 'use client' completely hangs the 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.3.0: Mon Jan 30 20:39:35 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T8103
Binaries:
Node: 18.16.0
npm: 9.2.0
Yarn: 1.22.10
pnpm: N/A
Relevant packages:
next: 13.4.5-canary.7
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)
App directory (appDir: true)
### Link to the code that reproduces this issue or a replay of the bug
-
### To Reproduce
Mark any page with 'use client', and the default exported component function with async.
### Describe the Bug
The page will run into and endless loop, and hang the browser
### Expected Behavior
Just the same as when using 'useState' in a component fails to compile with an error requiring 'use client', this should also fail to compile with an 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/50898 | https://github.com/vercel/next.js/pull/51547 | f1240b8efd24b03ce1b549d93d0de79dc0600b9b | 65f94baa834c3ca371ade70fc4f392c432e4c595 | "2023-06-07T12:00:22Z" | javascript | "2023-06-26T21:10:24Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 50,879 | ["packages/next/src/build/webpack/plugins/next-font-manifest-plugin.ts", "packages/next/src/client/app-link-gc.ts", "packages/next/src/server/dev/next-dev-server.ts", "packages/next/src/server/next-server.ts"] | [NEXT-1334] Next/Font jitters and causes a slight layout shift when using revalidatePath() or revalidateTag() | ### 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.16.0
npm: 9.6.7
Yarn: 1.22.4
pnpm: N/A
Relevant packages:
next: 13.4.5-canary.6
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)
App directory (appDir: true), Font optimization (next/font)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/elliotgonzalez123/next-font-jitter
### To Reproduce
Refresh page, or click one of the "delete" buttons
### Describe the Bug
The font on the page when using next/font will jitter and cause a layout shift when calling `revalidateTag()` or `revalidatePath()` inside a server action. You can also trigger the jitter by simply refreshing the page. If you remove the next/font package the jitter goes away.
Related discussion here: https://github.com/vercel/next.js/discussions/50782
https://github.com/vercel/next.js/assets/49325153/c69056b9-6a29-4a3c-9858-a0bc3492d28f
### Expected Behavior
The font does not jitter or cause a layout shift when calling `revalidateTag()` or `revalidatePath()` inside a server action.
### Which browser are you using? (if relevant)
Chrome Version 112.0.5615.137 (Official Build) (x86_64)
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1334](https://linear.app/vercel/issue/NEXT-1334/nextfont-jitters-and-causes-a-slight-layout-shift-when-using)</sub> | https://github.com/vercel/next.js/issues/50879 | https://github.com/vercel/next.js/pull/52033 | 97461f0bba86cb6ae62b6665b32f29a50993f241 | 636c776179ae1a2e9b2e7d7fdc7b898c39aaf431 | "2023-06-07T00:33:24Z" | javascript | "2023-06-30T17:11:37Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 50,863 | ["test/e2e/app-dir/global-error/basic/app/metadata-error-with-boundary/error.js", "test/e2e/app-dir/global-error/basic/app/metadata-error-with-boundary/page.js", "test/e2e/app-dir/global-error/basic/app/metadata-error-without-boundary/page.js", "test/e2e/app-dir/global-error/basic/index.test.ts"] | [NEXT-1305] Errors in generateMetadata are not caught by global-error.tsx boundary in dev mode | ### 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.13.0
npm: 8.13.2
Yarn: 1.22.19
pnpm: 8.2.0
Relevant packages:
next: 13.4.5-canary.6
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 router, error boundary, metadata
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/tom-sherman/nextjs-generate-metadata-bug
### To Reproduce
1. `pnpm dev`
2. Visit `/`
### Describe the Bug
It shows the default Next.js error page when in dev mode. When in production mode (`next start`) it works though.
### Expected Behavior
It should show my custom error boundary.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
Not relevant
See also See also https://github.com/vercel/next.js/discussions/49925
<sub>[NEXT-1305](https://linear.app/vercel/issue/NEXT-1305/errors-in-generatemetadata-are-not-caught-by-global-errortsx-boundary)</sub> | https://github.com/vercel/next.js/issues/50863 | https://github.com/vercel/next.js/pull/53581 | ab14895ada176c091df0c8594451e753a90f1aaf | 99372fbedfadff54dcdb88d61deee9473e0d5307 | "2023-06-06T18:05:41Z" | javascript | "2023-08-04T18:57:49Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 50,856 | ["packages/next/src/client/components/navigation.ts", "test/e2e/app-dir/use-params/app/[...path]/page.tsx", "test/e2e/app-dir/use-params/use-params.test.ts"] | useParams still returns a string for dynamic catchall routes, for example [...ids] | ### 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.5-canary.6
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/ancient-pond-wk3eu5
### To Reproduce
From the sandbox, go to any route in the browser: `/1/2/3/4` (whatever route you'd like)
### Describe the Bug
See that the value of dynamic route `[...ids]` from the `useParams` hook is a string:
<img width="485" alt="Screenshot 2023-06-06 at 11 08 02 AM" src="https://github.com/vercel/next.js/assets/19141291/c94e16f0-5866-41cd-a8a9-692778fc1d97">
### Expected Behavior
According to the docs, it should be returning an array 🤔
<img width="671" alt="Screenshot 2023-06-06 at 11 10 45 AM" src="https://github.com/vercel/next.js/assets/19141291/3fd438dc-d2eb-44f8-adee-456ed50e254e">
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1419](https://linear.app/vercel/issue/NEXT-1419/useparams-still-returns-a-string-for-dynamic-catchall-routes-for)</sub> | https://github.com/vercel/next.js/issues/50856 | https://github.com/vercel/next.js/pull/52494 | cf08f600772b17d692081c6302c254e4d68151fe | 73e2979cb8557148c450c0282a20acb2f3c6c642 | "2023-06-06T15:18:10Z" | javascript | "2023-07-10T12:04:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 50,844 | ["packages/next/src/build/webpack/loaders/next-flight-loader/index.ts"] | Docs: Warning about next/head in app links to wrong metadata docs | ### What is the improvement or update you wish to see?
In this warning:
> Warning: You’re using `next/head` inside the `app` directory, please migrate to the Metadata API. See [https://nextjs.org/docs/app/api-reference/file-conventions/metadata](https://nextjs.org/docs/app/api-reference/file-conventions/metadata) for more details.
The referenced page doesn’t say anything about `next/head` at all. The error message should contain a link to the page below instead.
### Is there any context that might help us understand?
I'm a new Next.js user and this was an impediment to my learning experience.
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/building-your-application/optimizing/metadata
<sub>[DX-1615](https://linear.app/vercel/issue/DX-1615/docs-warning-about-nexthead-in-app-links-to-wrong-metadata-docs)</sub> | https://github.com/vercel/next.js/issues/50844 | https://github.com/vercel/next.js/pull/51013 | a973ad64d423a4ddd5ced70e91b60d80ea90ee9b | d106155c9ca2aa2da86ff90b6a05ab54e9787d53 | "2023-06-06T13:06:08Z" | javascript | "2023-06-12T19:16:04Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 50,801 | ["packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts", "test/e2e/app-dir/actions/app-action.test.ts", "test/e2e/app-dir/actions/app/shared/action.js", "test/e2e/app-dir/actions/app/shared/client.js", "test/e2e/app-dir/actions/app/shared/page.js", "test/e2e/app-dir/actions/app/shared/server.js"] | [NEXT-1265] Importing a server action into client component makes `Form` `action` stop working | ### 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.13.0
npm: 8.19.3
Yarn: 1.22.19
pnpm: 8.2.0
Relevant packages:
next: 13.4.4
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)
App directory (appDir: true)
### Link to the code that reproduces this issue or a replay of the bug
https://github.com/joaobibiano/next-server-actions-issue
### To Reproduce
I recorded a small video with the steps to reproduce and also explained the problem very quickly
https://github.com/vercel/next.js/assets/29175815/de1ddef0-ccf9-4cd0-b250-4f3be5ba29ef
### Describe the Bug
After importing a server action directly into a client component and using it with `useTransition` the top `Form` with `action` stop working. You can check it the video attached
### Expected Behavior
The client component should work as we can find in the documentation
> Server Actions cannot be defined within Client Components, but they can be imported. To use Server Actions in Client Components, you can import the action from a file containing a top-level "use server" directive.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1265](https://linear.app/vercel/issue/NEXT-1265/importing-a-server-action-into-client-component-makes-form-action-stop)</sub> | https://github.com/vercel/next.js/issues/50801 | https://github.com/vercel/next.js/pull/51510 | 4cc57158485f4b359ad61dca17913da0bf666bfa | 30bb252434a8466bcf022a8ce12a841dde7abeb2 | "2023-06-05T14:56:28Z" | javascript | "2023-06-19T19:45:51Z" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.