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 | 44,143 | ["packages/next/src/build/webpack/loaders/next-image-loader.ts", "test/integration/next-image-legacy/default/components/static-img.js", "test/integration/next-image-legacy/default/pages/dynamic-static-img.js", "test/integration/next-image-legacy/default/test/index.test.ts", "test/integration/next-image-new/default/components/static-img.js", "test/integration/next-image-new/default/pages/dynamic-static-img.js", "test/integration/next-image-new/default/test/index.test.ts"] | Some static images missing from build in 13.0.7 | ### Verify canary release
- [ ] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
next 13.0.7
react 18.2.0
```
### 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
/
### To Reproduce
* update to `13.0.7`
* `yarn build`
* `yarn start`
Partial `next.config.js`, if relevant:
```
swcMinify: false,
images: {
minimumCacheTTL: 3 * 30 * day,
formats: ["image/avif", "image/webp"],
}
```
### Describe the Bug
Some static images return `404` and are missing from the build folder.
The exact same code works properly in `13.0.6`
### Expected Behavior
Images are present.
### Which browser are you using? (if relevant)
/
### How are you deploying your application? (if relevant)
`next start` | https://github.com/vercel/next.js/issues/44143 | https://github.com/vercel/next.js/pull/44831 | 9255da252581246239786ac38b58a54ae87c076e | 6fcb518f31a823915cd5ec21ede1975a2a66ddec | "2022-12-19T11:23:47Z" | javascript | "2023-01-12T19:24:59Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 44,120 | ["packages/next/src/build/index.ts", "test/production/standalone-mode/no-app-routes/app/layout.js", "test/production/standalone-mode/no-app-routes/index.test.ts", "test/production/standalone-mode/no-app-routes/next.config.js", "test/production/standalone-mode/no-app-routes/pages/hello.js"] | `output: 'standalone'` error: `ENOENT: no such file or directory, lstat .next/server/app` | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
`"next": "13.0.6",`
### Which area(s) of Next.js are affected? (leave empty if unsure)
_No response_
### Link to the code that reproduces this issue
private repo
### To Reproduce
Buildind a `output: 'standalone'` application bumps into the following build error:
```
> Build error occurred
[Error: ENOENT: no such file or directory, lstat '/apps/api/.next/server/app'] {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/apps/api/.next/server/app'
}
```
### Describe the Bug
Building a `output: 'standalone'` application bumps into the following build error:
```
> Build error occurred
[Error: ENOENT: no such file or directory, lstat '/apps/api/.next/server/app'] {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/apps/api/.next/server/app'
}
```
### Expected Behavior
No build 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/44120 | https://github.com/vercel/next.js/pull/51993 | 62c2c5abc2f7f3cfa99e66bacd64b1d56d45e85c | 98cc99df466dd45d8150dfa4858f3484ccbd6e8b | "2022-12-18T08:36:55Z" | javascript | "2023-07-10T08:40:02Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 44,077 | ["packages/next/src/build/analysis/get-page-static-info.ts", "test/e2e/edge-configurable-runtime/app/src/pages/api/edge.js", "test/e2e/edge-configurable-runtime/app/src/pages/index.jsx", "test/e2e/edge-configurable-runtime/index.test.ts"] | Edge API routes exclude src directory | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022
Binaries:
Node: 18.12.1
npm: 8.19.2
Yarn: 1.22.19
pnpm: 7.17.1
Relevant packages:
next: 13.0.7
eslint-config-next: 13.0.7
react: 18.2.0
react-dom: 18.2.0
### Which area(s) of Next.js are affected? (leave empty if unsure)
Middleware / Edge (API routes, runtime)
### Link to the code that reproduces this issue
https://github.com/nickbabcock/rl-web
### To Reproduce
Switch config of `src/pages/api/replay` to:
```ts
export const config = {
runtime: "edge",
};
```
And execute `npm run dev`.
(apologies, the repo isn't technically a minimal reproduction (as 13.0.7, seems to break in other ways), but the issue / solution should be clear. If not I'll create one a minimal reproduction).
### Describe the Bug
[Next.js supports](https://nextjs.org/docs/advanced-features/src-directory) putting pages in the `src` directory.
So when I tried testing GA version of edge functions (#44045 cc @feugy), I received the following error:
> Page /src/pages/api/replay provided runtime 'edge', the edge runtime for rendering is currently experimental. Use runtime 'experimental-edge' instead.
[I see that #44045 looks if the route starts with `/pages`](https://github.com/vercel/next.js/pull/44045/files#diff-cb7ac6392c3dd707c5edab159c3144ec114eafea92dad5d98f4eedfc612174d2R346) so a `/src/pages` route throws it off. The solution seems like it should look in the `src` directory too.
A temporary workaround is to move the pages outside of the `src` directory.
### Expected Behavior
If `src` directory is supported then edge API routes hosted in `src/pages/api` shouldn't 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/44077 | https://github.com/vercel/next.js/pull/45093 | 9db8145858d3df1ea84c857c02b48d0a549bb8a3 | e8ae4e219e174f0aed8782cef2ab4d081aee36d1 | "2022-12-16T12:41:37Z" | javascript | "2023-01-20T19:04:27Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 44,068 | ["packages/next/src/build/webpack/loaders/next-image-loader.ts", "test/integration/next-image-legacy/default/components/static-img.js", "test/integration/next-image-legacy/default/pages/dynamic-static-img.js", "test/integration/next-image-legacy/default/test/index.test.ts", "test/integration/next-image-new/default/components/static-img.js", "test/integration/next-image-new/default/pages/dynamic-static-img.js", "test/integration/next-image-new/default/test/index.test.ts"] | Images imported by dynamically imported component (even transitively) are not built in DEV | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022
Binaries:
Node: 18.1.0
npm: 8.8.0
Yarn: 1.22.17
pnpm: N/A
Relevant packages:
next: 13.0.8-canary.0
eslint-config-next: 13.0.7
react: 18.2.0
react-dom: 18.2.0
### Which area(s) of Next.js are affected? (leave empty if unsure)
Dynamic imports (next/dynamic)
### Link to the code that reproduces this issue
https://github.com/nicknotfun/dynimp
### To Reproduce
README in repository is up to date, but I believe any dynamic import component that then imports a static image transitively would have the issue.
1. Run `yarn dev`
### Describe the Bug
Observe that the dynamically loaded component is present, however the image it refers to (itself a regular import) is not processed by the dev server and is a broken image.
### Expected Behavior
The image works consistently.
Potential basis for workaround: This is fixed by directly visiting the dynamically loaded 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/44068 | https://github.com/vercel/next.js/pull/44831 | 9255da252581246239786ac38b58a54ae87c076e | 6fcb518f31a823915cd5ec21ede1975a2a66ddec | "2022-12-15T23:29:14Z" | javascript | "2023-01-12T19:24:59Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 44,058 | ["packages/next/src/build/swc/index.ts", "packages/next/src/lib/download-wasm-swc.ts"] | Doesn't build on OpenBSD | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: openbsd
Arch: x64
Version: GENERIC.MP#890
Binaries:
Node: 16.17.1
npm: 8.15.0
Yarn: 1.22.18
pnpm: N/A
Relevant packages:
next: 13.0.7-canary.7
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
```
### Which area(s) of Next.js are affected? (leave empty if unsure)
Static HTML Export (next export)
### Link to the code that reproduces this issue
https://github.com/vercel/next.js/tree/canary/examples/reproduction-template
### To Reproduce
`yarn build`
or
`yarn run dev`
### Describe the Bug
Crashes during build time.
```
yarn run v1.22.18
$ next build
/home/user/reproduction-app/node_modules/next/dist/build/swc/index.js:70
const triples = _triples.platformArchTriples[PlatformName][ArchName] || [];
^
TypeError: Cannot read properties of undefined (reading 'x64')
at Object.<anonymous> (/home/user/reproduction-app/node_modules/next/dist/build/swc/index.js:70:59)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at Module.require (node:internal/modules/cjs/loader:1028:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/user/reproduction-app/node_modules/next/dist/build/analysis/parse-module.js:9:12)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
### Expected Behavior
No crash.
### 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/44058 | https://github.com/vercel/next.js/pull/47570 | b28cd21ee57bfd9c2f7e775310e42b1ec9dd1eab | a0c2703245d2edfe9642d469611b273c8942c6f3 | "2022-12-15T16:27:27Z" | javascript | "2023-03-27T18:39:53Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,999 | ["packages/next/src/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts", "packages/next/src/server/lib/render-server.ts", "packages/next/src/server/lib/server-ipc.ts", "packages/next/src/server/next-server.ts", "packages/next/src/server/web/sandbox/context.ts", "test/integration/middleware-dev-update/test/index.test.js"] | Regression of middlewares performance in next dev (v13) | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 16.18.1
npm: 8.19.2
Yarn: 1.22.17
pnpm: N/A
Relevant packages:
next: 13.0.7-canary.5
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### Which area(s) of Next.js are affected? (leave empty if unsure)
Middleware / Edge (API routes, runtime)
### Link to the code that reproduces this issue
https://github.com/ValentinH/next-13-midlewares-regression
### To Reproduce
- create a simple API route (the one from the `create-next-app` example does the job)
- add a middleware simply returning `NextResponse.next()`
- run with `next dev`
- load test the API route
I shared a script in the reproduction repository for the load test.
### Describe the Bug
While trying to upgrade our applications to Next.js 13, we noticed that some of our E2E tests were failing due to timeouts. After digging into it, we noticed that our API routes were much slower than on v12.
It turns out that this is related to the fact that we are using middlewares to protect our API.
Removing them fixes the slowner.
### Expected Behavior
Middlewares should be, at least, as fast as on v12.
### 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/43999 | https://github.com/vercel/next.js/pull/47840 | 68f328f92077e210ae3ee5724ef02035f55d61ba | b3a7d9f0304245a05bbb3bf7372fc8ac0d1fe1cb | "2022-12-13T11:08:05Z" | javascript | "2023-04-03T06:51:25Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,946 | ["docs/api-reference/next.config.js/basepath.md"] | Docs: fix `basePath` docs | ### What is the improvement or update you wish to see?
Docs [say](https://nextjs.org/docs/api-reference/next.config.js/basepath):
> basePath allows you to set a path prefix for the application. For example, to use `/docs` instead of `/` (the default), open next.config.js and add the basePath config
To make this configurable for deployments we add something like this to config...
```javascript
basePath: process.env.BASE_PATH || '/'
```
Which (when `BASE_PATH` env is not set) results in....
`Error: Specified basePath /. basePath has to be either an empty string or a path prefix"`
Pretty confusing if `/` is the default that this would result in an error.
### Is there any context that might help us understand?
If I set `basePath` to the default of `/` it results in an error. It doesn't make any sense that I cannot set it (back) to the default.
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/api-reference/next.config.js/basepath | https://github.com/vercel/next.js/issues/43946 | https://github.com/vercel/next.js/pull/44642 | 3a9e53276885a237f42ad37f592a6cc325032c7f | 54ef48f79677f8edf5735dbdd09e5ef8912787a1 | "2022-12-11T19:22:24Z" | javascript | "2023-01-06T17:55:39Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,895 | ["packages/next-swc/crates/core/src/lib.rs", "packages/next-swc/crates/core/src/next_dynamic.rs", "packages/next-swc/crates/core/tests/errors.rs", "packages/next-swc/crates/core/tests/fixture.rs", "packages/next-swc/crates/core/tests/fixture/next-dynamic/with-options/output-server.js", "packages/next-swc/crates/core/tests/fixture/next-dynamic/wrapped-import/output-server.js", "test/development/basic-basepath/next-dynamic.test.ts", "test/development/basic/next-dynamic.test.ts"] | next/dynamic with ssr: false | changed behaviour / breaking builds in Next 13 | ### 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.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64
Binaries:
Node: 16.18.1
npm: 7.20.2
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.7-canary.4
eslint-config-next: 12.1.0
react: 18.2.0
react-dom: 18.2.0
### Which area(s) of Next.js are affected? (leave empty if unsure)
Dynamic imports (next/dynamic)
### Link to the code that reproduces this issue
https://github.com/maxcbc/nextjs-13-dynamic-bug
### To Reproduce
1. Clone repo
2. npm install
3. npm run fake-deps
4. npm run build
#### Investigation Points
1. npm install [email protected] --no-save
2. Update line 1 of `./components/dynamic-thing/some-client-side-only-component.tsx` to `import foo from 'fake-dependency-1/browser'`
3. npm run build
4. cat .next/server/pages/index.js.nft.json | grep "fake"
##### Adding `main` property
1. git checkout ./components/dynamic-thing/some-client-side-only-component.tsx
2. npm install
3. Add `"main": "browser.js",` to each of the fake dependency package.json files
4. npm run fake-deps
5. npm run build
6. cat .next/server/pages/index.js.nft.json | grep "fake"
### Describe the Bug
Broken somewhere between 12.3.4 and 13.0.6.
Module not found errors in build when running the above.
Can be fixed by adding a `main` property in the `package.json` of the 'missing' modules.
### Expected Behavior
In the example above `./some-client-side-only-component.tsx` should never be required when compiling serverside code.
There should be no trace of them in `.next/server` after a build.
### 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/43895 | https://github.com/vercel/next.js/pull/43974 | 5e3bb45f55fe1b3323e2948f983e477e86aa1a7b | 8e0439834305cf5296742277a5a2c8e8bc62a02d | "2022-12-09T16:33:14Z" | javascript | "2022-12-12T22:32:54Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,854 | ["packages/next/build/webpack/plugins/flight-client-entry-plugin.ts", "test/integration/app-dir-basic/app/blog/page.js", "test/integration/app-dir-basic/app/page.js", "test/integration/app-dir-basic/test/index.test.js"] | use of client components causes error in 13.0.7-canary.3 | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 18.4.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.7-canary.3
eslint-config-next: 13.0.7-canary.3
react: 18.2.0
react-dom: 18.2.0
### Which area(s) of Next.js are affected? (leave empty if unsure)
_No response_
### Link to the code that reproduces this issue
https://github.com/rafma0/next-brokenuseclient
ㅤ
### To Reproduce
Test.tsx
```js
'use client'
export default function Test () {
return (
<p>test</p>
)
}
```
page.tsx
```js
import Test from './Test'
export default function HomePage () {
return (
<Test />
)
}
```
### Describe the Bug
Trying to use a client component in server page results in
```console
Uncaught TypeError: Cannot read properties of undefined (reading 'call')
The above error occurred in the <NotFoundErrorBoundary> component
Uncaught Error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.
```
### Expected Behavior
The same code works fine in `13.0.7-canary.1`
### 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/43854 | https://github.com/vercel/next.js/pull/44052 | bf4e6fb586ddb31060fd0726816c980f204c5cfa | 327634eb248892d5280c54d57f8202547625e5b8 | "2022-12-08T17:15:37Z" | javascript | "2022-12-15T18:34:02Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,831 | ["packages/next/src/server/base-server.ts", "test/e2e/app-dir/app-static/app-static.test.ts", "test/e2e/app-dir/app-static/app/articles/[slug]/page.tsx"] | ISR caches 404 result, but not status code | ### 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.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64
Binaries:
Node: 16.18.1
npm: 8.19.2
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.7-canary.1
eslint-config-next: 13.0.6
react: 18.2.0
react-dom: 18.2.0
### Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Middleware / Edge (API routes, runtime), Routing (next/router, next/navigation, next/link)
### Link to the code that reproduces this issue
https://github.com/perevernihata/nextjs-isr-404-caching
### To Reproduce
1. clone the repo https://github.com/perevernihata/nextjs-isr-404-caching
2. yarn && yarn build && yarn start
3. Open the browser, open the development console network tab
4. Navigate to http://localhost:3000/articles/test-404-then-200-page-result
5. Observe that the first-time request returns 404, and the second and all subsequent page refreshes return the same `Not Found` page with a 200 status code. Also, subsequent requests have `x-nextjs-cache: HIT` header.
<img width="1101" alt="image" src="https://user-images.githubusercontent.com/4924933/206294525-799ca8d6-48e3-4099-b651-988255268920.png">
### Describe the Bug
With ISR enabled, nextjs caches the 404-page content, but it does not cache the status code, therefore 404 is only returned the first time, and the rest of the time it is 200.
I would think, that 400 to 500 status codes should not be cached on ISR at all.
What makes it worse is that I can not conditionally disable caching or ISR for specific results in runtime.
### Expected Behavior
I would expect 1 ouf these 2 options:
- All status codes above 400 are not cached by ISR at all
- If the response is cached then the status code is also preserved
Alternatively, it would be also great to have API to decide if we want this specific response to be cached or not, e.g.:
```
const Article = ({ params }: Props) => {
const { slug } = params;
if (slug !== "works") {
// currently notFound does not support any params
return notFound({ disableIsr: true });
}
return <div>Articles page with slug</div>;
};
```
### Which browser are you using? (if relevant)
Chrome, but irrelevant
### How are you deploying your application? (if relevant)
AWS, but irrelevant | https://github.com/vercel/next.js/issues/43831 | https://github.com/vercel/next.js/pull/55542 | 0338dcdf2cb1e56dbece1042552b5daf057096e8 | 9697bcd3c8672f7926cc19222e9c5801a9f49c6b | "2022-12-07T21:05:20Z" | javascript | "2023-09-18T19:35:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,829 | ["packages/next/client/image.tsx", "test/integration/next-image-new/default/pages/blurry-placeholder.js", "test/integration/next-image-new/default/test/index.test.ts", "test/integration/production/test/index.test.js"] | NextJS after updating from 13.0.4 to 13.0.6 next/image blur placeholder not working properly | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 16.18.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.6
eslint-config-next: 13.0.6
react: 18.2.0
react-dom: 18.2.0
### Which area(s) of Next.js are affected? (leave empty if unsure)
Image optimization (next/image, next/legacy/image)
### Link to the code that reproduces this issue
npm i next@latest
### To Reproduce
After updating nextjs from 13.0.4 to 13.0.6
### Describe the Bug
it broke all the blurdataurl shimmer effect, it is not shimmering at all its just sticking to image
its even in my production for example https://www.playerse.net/valorant/agents
### Expected Behavior
Expected behaviour was shimmer image while loading and load image properly
### Which browser are you using? (if relevant)
Chrome 108.0.5359.99, Firefox dev edition 108.0b9 (64-bit
### How are you deploying your application? (if relevant)
Vercel | https://github.com/vercel/next.js/issues/43829 | https://github.com/vercel/next.js/pull/44094 | fa880d04ea3f884e61e1b6d1dcfb529b104ec8e8 | 723311bde9b3ddc5186ab9a305fc943aaee699ba | "2022-12-07T20:32:43Z" | javascript | "2022-12-19T17:10:23Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,764 | ["packages/next/shared/lib/dynamic.tsx", "test/e2e/app-dir/app/app/dashboard/dynamic/dynamic-imports/dynamic-client.js", "test/e2e/app-dir/app/app/dashboard/dynamic/text-dynamic-no-ssr-client.js", "test/e2e/app-dir/index.test.ts"] | nextjs app-dir bug with dynamic imports | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: Ubuntu 20.04.0 LTS Tue Dec 06 2022 14:12:26 GMT+0100 (heure normale d’Europe centrale)
Binaries:
Node: 16.14.2
npm: 7.17.0
Yarn: 1.22.19
pnpm: 7.13.6
Relevant packages:
next: 13.0.6
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Dynamic imports (next/dynamic)
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://stackblitz.com/edit/nextjs-zkhpkm?file=app%2Ftest%2Fpage.js
### To Reproduce
Go to the page `/test` on your browser, you'll see that the console.log which is supposed to only run on client get to run also on the server. You will also see that nextjs show that hydration errors occurs.
It seems like the component which is marked with `ssr: false` still get to run on the server and you can even inspect the source code generated and you will see the content of the server .
You can check the page at `/problem` which is located in the `pages` directory and it seems to work there without an issue.
### Describe the Bug
Within app directory nextjs seems to ignore the parameter `ssr: false` when using dynamic imports and always run the component on the server. On top of that it produces a hydration error when used.
This seems to only occur within the app directory and not the `pages` directory.
For information i used the import on pages with the 'use client' directive on top.
### Expected Behavior
Nextjs should respect the parameter `ssr: false` of dynamic imports and not try to render the page on the server.
### 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/43764 | https://github.com/vercel/next.js/pull/43901 | 5415a0d9543ce9b311a074112b133a060318dd61 | d8545e62733c1d07192fedf938f6a8672c33cd29 | "2022-12-06T13:21:28Z" | javascript | "2022-12-09T19:00:28Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,732 | ["packages/next-swc/crates/core/src/auto_cjs/mod.rs", "packages/next-swc/crates/core/tests/full/auto-cjs/2/input.js", "packages/next-swc/crates/core/tests/full/auto-cjs/2/output.js", "packages/next-swc/crates/core/tests/full/auto-cjs/3/input.js", "packages/next-swc/crates/core/tests/full/auto-cjs/3/output.js"] | [next-swc] file will be treated as cjs even if it just contains `__esModule` as a normal string | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```bash
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 18.12.0
npm: 8.19.2
Yarn: 1.23.0-20220130.1630
pnpm: 7.14.0
Relevant packages:
next: 13.0.7-canary.1
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
```
_No response_
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/promer94/next-cjs-detect
### To Reproduce
```bash
pnpm install
pnpm dev
```
* navigate to /cjs, the error will showup
* as a comparsion, naviate to /esm. It works as expected.
<img width="1270" alt="Screenshot 2022-12-05 at 22 04 16" src="https://user-images.githubusercontent.com/15878786/205656298-4cfefb7c-498d-4518-b73b-f0664e094b57.png">
### Describe the Bug
file will be treated as cjs even if it just contains `__esModule` as a normal string
related commit: https://github.com/vercel/next.js/pull/38181/files
### Expected Behavior
a batter cjs detect method ? | https://github.com/vercel/next.js/issues/43732 | https://github.com/vercel/next.js/pull/46448 | 69fe4eee39747861bc7bc306ac5ab1a2e5786596 | 16d7ffdd11f04f459194f19c55d3d452e38021b9 | "2022-12-05T14:03:11Z" | javascript | "2023-02-27T16:56:05Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,689 | ["packages/next/client/image.tsx", "test/integration/next-image-new/default/pages/blurry-placeholder.js", "test/integration/next-image-new/default/test/index.test.ts", "test/integration/production/test/index.test.js"] | A gray background will appear after the next/image component is loaded using placeholder='blur' | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
"next": "^13.0.6"
### Which area(s) of Next.js are affected? (leave empty if unsure)
_No response_
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
create-next-app
### To Reproduce
<Image alt="" src={require('@images/home/space/cover_01.png')} placeholder="blur" />
### Describe the Bug
A gray background will appear after the next/image component is loaded using placeholder='blur'
The previous nextjs version did not encounter this problem
Below is a schematic diagram of the code and rendering


### Expected Behavior
When the placeholder='blur' attribute is used, these introverted styles should not exist after the image is loaded, and can be removed. Now it is an obvious bug
### 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/43689 | https://github.com/vercel/next.js/pull/44094 | fa880d04ea3f884e61e1b6d1dcfb529b104ec8e8 | 723311bde9b3ddc5186ab9a305fc943aaee699ba | "2022-12-04T11:03:36Z" | javascript | "2022-12-19T17:10:23Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,605 | ["packages/next/src/client/components/router-reducer/fetch-server-response.ts"] | [NEXT-325] NextJS13 - AppDir - Server redirect happens as fetch not browser redirection | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Home Single Language
Binaries:
Node: 18.5.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.6-canary.3
eslint-config-next: 13.0.2
react: 18.2.0
react-dom: 18.2.0
### Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/vercel/next.js/files/10133225/next-redirect-demo.zip
### To Reproduce
Build & run the sample
[next-redirect-demo.zip](https://github.com/vercel/next.js/files/10133225/next-redirect-demo.zip)
```
yarn install
yarn dev
```
Navigate to `/test/A` this should do below:
- Renders page `test/[slug]/page`, which redirects to `/external`
- `/external` is a pages route and server redirects (302) to external site `google.com`
The server redirect is done via fetch and not browser redirection.

### Describe the Bug
The app has below pages
- `/test/[slug]/page.tsx` - using app dir route and server redirect from next/navigation
- `/external` - pages route that redirects to external site.
If user enters `/external` in url, the page correctly does a 302 redirect to external site. This is expected behaviour.
If user enters `/test/A` in the url, the page also returns a 302, but the redirection happens via fetch. This is not expected behaviour.
**Expected Behaviour**:
The redirection should be browser redirection and not done via fetch.
To reproduce the bug
Navigate to `/test/A` this should do below:
- Renders page `test/[slug]/page`, which redirects to `/external`
- `/external` is a pages route and server redirects to external site `google.com`
### Expected Behavior
The route `/test/A` should be browser redirection and not done via fetch.
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-325](https://linear.app/vercel/issue/NEXT-325/nextjs13-appdir-server-redirect-happens-as-fetch-not-browser)</sub> | https://github.com/vercel/next.js/issues/43605 | https://github.com/vercel/next.js/pull/46674 | f2989f747f75e143d1dd2c5d89156aedfde23e6a | 5aa9bc8bac1c2617c02574f195e5588e0a6c74ed | "2022-12-01T14:31:27Z" | javascript | "2023-03-04T14:47:12Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,598 | ["packages/next/src/shared/lib/router/router.ts", "test/e2e/middleware-dynamic-basepath-matcher/app/middleware.js", "test/e2e/middleware-dynamic-basepath-matcher/app/next.config.js", "test/e2e/middleware-dynamic-basepath-matcher/app/pages/[path]/[[...pages]].js", "test/e2e/middleware-dynamic-basepath-matcher/test/index.test.ts"] | Router.query contains _next when using middleware with dynamic routes | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 16.17.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.5
eslint-config-next: 13.0.5
react: 18.2.0
react-dom: 18.2.0
### Which area of Next.js is affected? (leave empty if unsure)
Middleware / Edge (API routes, runtime)
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/mv-nborrett/middleware-dynamic-routes
### To Reproduce
- Run the project usng `npm run dev`.
- Navigate to http://localhost:3000/base/default.
- See that the text "The path is: default" is correctly displayed.
- Select the link labelled "Link to another page". This navigates the user to http://localhost:3000/base/another-page.
- See that the text "The path is: another-page" is correctly displayed.
- Go back using the back button. This navigates the user back to http://localhost:3000/base/default.
- See that the text "The path is: _next" is displayed.
### Describe the Bug
My understanding is that router.query.path should match the path segment matched in the dynamic route. However, when middleware is used, even if that middleware just passes the request through without taking any action, router.query.path displays _next in certain situations. If the middleware is removed (ie, middleware.ts is deleted), router.query.path always displays the correct value.
### Expected Behavior
I would expect router.query.path to contain the path segment displayed in the URL. The reason that this is an issue is that we have buttons which use router.query.path as a prefix when linking to pages deeper in the tree. This means that the button sends the user to http://localhost:3000/base/_next/child-page instead of http://localhost:3000/base/default/child-page.
### Which browser are you using? (if relevant)
Chrome 107.0.5304.122 (Official Build) (32-bit)
### How are you deploying your application? (if relevant)
npm run dev | https://github.com/vercel/next.js/issues/43598 | https://github.com/vercel/next.js/pull/48753 | 761c293093a91151d154310dfa241ec6b88dbb15 | 81f5ed7aa29a210b352b9c7331b62547e9881f67 | "2022-12-01T09:39:54Z" | javascript | "2023-05-09T10:49:27Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,566 | ["docs/api-reference/next/script.md", "packages/create-next-app/index.ts"] | Docs: Inconsistency regarding where to put <Script> components that have the `beforeInteractive` strategy. | ### What is the improvement or update you wish to see?
There appears to be an inconsistency in the recommended location of a <Script> component using the `beforeInteractive` strategy.
One [page in the docs](https://nextjs.org/docs/api-reference/next/script#beforeinteractive) recommends `_app.js` as the location:
> `beforeInteractive` scripts must be placed inside `pages/_app.js` and are designed to load scripts that are needed by the entire site (i.e. the script will load when any page in the application has been loaded server-side).
In contrast, a linter error and [the corresponding explanation](https://nextjs.org/docs/messages/no-before-interactive-script-outside-document) of the message recommends putting the same <Script> inside the `_document.js` page (see below for the relevant warning).
Would it be possible for the docs to clarify the best placement of such a <Script>?
### Is there any context that might help us understand?
If you add the above-described script in `_app.js`, you receive the following warning:
> `next/script`'s `beforeInteractive` strategy should not be used outside of `pages/_document.js`. See: https://nextjs.org/docs/messages/no-before-interactive-script-outside-documenteslint[@next/next/no-before-interactive-script-outside-document](https://nextjs.org/docs/messages/no-before-interactive-script-outside-document)
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/api-reference/next/script#beforeinteractive | https://github.com/vercel/next.js/issues/43566 | https://github.com/vercel/next.js/pull/44898 | c35aec8d9309e97b7df5df24a4a86865545fa514 | 196957fd681d96464b2563e341521beba0d5f449 | "2022-11-30T15:56:13Z" | javascript | "2023-01-16T01:08:11Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,548 | ["packages/next/src/server/app-render/app-render.tsx", "test/e2e/app-dir/app/app/linking/about/loading.js", "test/e2e/app-dir/app/index.test.ts"] | [NEXT-1187] Link navigation with loading.tsx is not instant for dynamic pages | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103
Binaries:
Node: 18.12.1
npm: 8.19.2
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.6-canary.2
eslint-config-next: 13.0.5
react: 18.2.0
react-dom: 18.2.0
### Which area of Next.js is affected? (leave empty if unsure)
App directory (appDir: true), Routing (next/router, next/navigation, next/link)
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/tonypizzicato/next-13-loading
### To Reproduce
- pull the repo
- run `yarn install && yarn dev`
- open `localhost:3000` in the browser
- go to the "Careers" page
- reload the page
- set some throttling in devtools
- click different pages in the menu
- notice that "Careers" page loading state and route change are done instantly but with some delay for other pages
### Describe the Bug
When you have a dynamic page with `loading.tsx` the route change and showing the loading animation are instant only for the page, which was freshly loaded. For other dynamic pages it hits the server first, then shows the loading state
<img width="193" alt="Screenshot 2022-11-29 at 23 19 38" src="https://user-images.githubusercontent.com/640122/204660865-5d64b2bf-ef2f-4c4e-9d7b-5cf05944e3d1.png">
https://user-images.githubusercontent.com/640122/204661070-b9409f71-3814-45e6-bf56-923cdf4e2fc6.mov
### Expected Behavior
Instantly navigate to the desired dynamic page and show loading component
### Which browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
<sub>[NEXT-1187](https://linear.app/vercel/issue/NEXT-1187/link-navigation-with-loadingtsx-is-not-instant-for-dynamic-pages)</sub> | https://github.com/vercel/next.js/issues/43548 | https://github.com/vercel/next.js/pull/55950 | 69439d8583ba8c76cad6db3ba27dc19b1f9371f0 | ca57258dbd4d5b3aba119088e2c188bf0f4671bc | "2022-11-29T22:21:58Z" | javascript | "2023-09-25T12:59:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,512 | ["examples/with-mobx-state-tree/README.md", "examples/with-mobx/README.md"] | with-mobx example install command | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Not needed
### Which example does this report relate to?
with-mobx
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
The `How to use` section of the `with-mobx` example is using an outdated example name.
Current command:
`${packageManager} create-next-app --example with-mobx-react-lite with-mobx-react-lite-app`
### Expected Behavior
The expected command should only use `with-mobx` to correspond to the example name.
`${packageManager} create-next-app --example with-mobx with-mobx-app`
### To Reproduce
No steps to be taken. | https://github.com/vercel/next.js/issues/43512 | https://github.com/vercel/next.js/pull/43534 | 524f99221dd482d2b906bc0c9854c4d27f49bd3d | f15b5d0af7f3f78a760ef65ac73ca2ce980bf6f8 | "2022-11-29T12:54:17Z" | javascript | "2022-11-29T17:10:33Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,460 | ["packages/next/client/components/react-dev-overlay/hot-reloader-client.tsx", "packages/next/client/components/react-dev-overlay/internal/container/Errors.tsx", "test/development/acceptance-app/ReactRefreshLogBox.test.ts", "test/development/acceptance-app/ReactRefreshRegression.test.ts", "test/development/acceptance-app/helpers.ts", "test/e2e/app-dir/dynamic-href.test.ts", "test/e2e/app-dir/index.test.ts", "test/lib/next-test-utils.js"] | Error overlay should open as minimized in `app` on runtime errors | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Currently when there's a runtime error - the error overlay opens up in full screen mode. In `app` it should open in the minimized state.
Build errors will still have to open up in full screen since the app will not be runnable due to it being broken. | https://github.com/vercel/next.js/issues/43460 | https://github.com/vercel/next.js/pull/43511 | 1c89da60f0f13b57c1f37c32dd9bd6ccee77990e | b2dd167eaa65afe52c5bdb6d94cc530055e7649e | "2022-11-28T15:26:49Z" | javascript | "2022-12-01T04:37:48Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,448 | ["errors/fast-refresh-reload.md", "errors/manifest.json", "packages/next/client/dev/error-overlay/hot-dev-client.js", "packages/next/server/dev/hot-reloader.ts", "test/development/basic/hmr.test.ts"] | Fast Refresh full reload stacktrace is too verbose | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Describe the Bug
Fast Refresh full reload stacktrace is too verbose. The logged stacktrace should be cleaned up. Ref: [slack](https://vercel.slack.com/archives/C03KAR5DCKC/p1669591532585509)
### Expected Behavior
Useful info logged when doing full reload | https://github.com/vercel/next.js/issues/43448 | https://github.com/vercel/next.js/pull/43453 | b418a88757f5a27e258dc5b6b9d84993c5a9239b | cd8a1a4be5ef1050d789efc1cd1080d8c7b622e0 | "2022-11-28T09:36:37Z" | javascript | "2022-11-28T13:18:26Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,396 | ["packages/next/src/server/dev/hot-reloader.ts", "test/e2e/app-dir/app-css/index.test.ts"] | [NEXT-684] Fast-refresh for CSS files is not working in Firefox | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 19.1.0
npm: 8.19.3
Yarn: 1.22.19
pnpm: 7.14.2
Relevant packages:
next: 13.0.6-canary.1
eslint-config-next: 13.0.5
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
So I just started a new next.js app using the `v13.0.5` with the experimental `app` folder. I noticed that CSS changes are not correctly updated in the browser. The browser is notified of the change, but the styles are not applied - if I manually refresh the browser I can see the correct styles.
I also tried the canary version and the error still exists. Moving to `v13.0.4` seems to work fine.
And I also tried with Tailwind following the beta documentation and also it doesn't work.
### Expected Behavior
Updating styles should fast refresh and update the page with the new styles.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://stackblitz.com/edit/vercel-next-js-viybne?file=app/global.css
### To Reproduce
Open the `global.css` file, change the colors and save the file.
You can see it working with the 13.0.4:
https://stackblitz.com/edit/vercel-next-js-6sncvk?file=app/global.css
<sub>[NEXT-684](https://linear.app/vercel/issue/NEXT-684/fast-refresh-for-css-files-is-not-working-in-firefox)</sub> | https://github.com/vercel/next.js/issues/43396 | https://github.com/vercel/next.js/pull/49534 | 881d202962b4226330b6fe4986d0cc943e4f40e6 | d9b82a9535e5d5d4bcd238da7cfd8d1154b7d2de | "2022-11-25T19:45:43Z" | javascript | "2023-05-09T16:28:37Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,392 | ["packages/next/client/components/headers.ts", "test/e2e/app-dir/app-static.test.ts", "test/e2e/app-dir/app-static/app/ssg-preview/[[...route]]/page.js"] | [appDir] Development Server throws Error: Dynamic server usage: previewData when using generateStaticParams with previewData from next/headers | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103
Binaries:
Node: 16.15.1
npm: 8.11.0
Yarn: 1.22.17
pnpm: 7.14.1
Relevant packages:
next: 13.0.6-canary.1
eslint-config-next: 13.0.5
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Firefox 107.0
### How are you deploying your application? (if relevant)
Vercel
### Describe the Bug
Using `generateStaticParams` with `previewData()` will throw an error in development mode. It works fine in production.
### Expected Behavior
We should be able to preview a statically generated page with `previewData` since this call does not make the page dynamic as calling `cookies` and `headers` does.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/brvnonascimento/next-13-preview-data-error
### To Reproduce
1. Clone [the reproduction repository](https://github.com/brvnonascimento/next-13-preview-data-error)
2. Run `yarn dev`
3. Visiting any route will give you `Dynamic server usage: previewData`
4. Run `yarn build && yarn start` or visit [the deployed version on Vercel](https://next-13-preview-data-error-5sqc6xcpd-brvnonascimento.vercel.app/)
5. Should work just fine
<img width="1099" alt="Screenshot 2022-11-25 at 14 41 27" src="https://user-images.githubusercontent.com/34252418/204034648-9f547b5a-b8e3-4388-bc95-3620902e4d23.png">
```tsx
import Image from "next/image";
import { previewData } from "next/headers";
import styles from "./page.module.css";
export default function Page() {
const preview = previewData();
console.log({ preview });
return (
<div className={styles.container}>
<main className={styles.main}>
<h1 className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js 13!</a>
</h1>
<p className={styles.description}>
Get started by editing{" "}
<code className={styles.code}>app/page.tsx</code>
</p>
<div className={styles.grid}>
<a href="https://beta.nextjs.org/docs" className={styles.card}>
<h2>Documentation →</h2>
<p>Find in-depth information about Next.js 13</p>
</a>
<a
href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card}
>
<h2>Examples →</h2>
<p>Explore the Next.js 13 playground.</p>
</a>
<a
href="https://vercel.com/templates/next.js/app-directory?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
className={styles.card}
>
<h2>Deploy →</h2>
<p>Deploy your Next.js site to a public URL with Vercel.</p>
</a>
</div>
</main>
<footer className={styles.footer}>
<a
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Powered by{" "}
<span className={styles.logo}>
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
</span>
</a>
</footer>
</div>
);
}
export const generateStaticParams = async () => {
const paths = [
{
route: [""],
},
{
route: ["about"],
},
{
route: ["services"],
},
];
return paths;
};
```
| https://github.com/vercel/next.js/issues/43392 | https://github.com/vercel/next.js/pull/43395 | 30c96271335c313c8d0a8f75537d2188bdaba63e | 1c89da60f0f13b57c1f37c32dd9bd6ccee77990e | "2022-11-25T17:41:57Z" | javascript | "2022-12-01T04:28:05Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,384 | ["packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts", "packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts", "packages/next/src/server/web-server.ts", "test/e2e/app-dir/app/app/catch-all-edge/[...slug]/page.js", "test/e2e/app-dir/app/index.test.ts"] | [NEXT-652] [Next 13 + app/ dir + Edge runtime] Catch-all route produces error in dev | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Codesandbox:
```
➜ workspace yarn next info
yarn run v1.22.19
$ /project/home/paulyoung5/workspace/node_modules/.bin/next info
Operating System:
Platform: linux
Arch: x64
Version: #20 SMP Tue Aug 30 18:45:03 CEST 2022
Binaries:
Node: 16.17.0
npm: 8.15.0
Yarn: 1.22.19
pnpm: 7.1.0
Relevant packages:
next: 13.0.6-canary.1
eslint-config-next: 12.0.9
react: 18.2.0
react-dom: 18.2.0
Done in 1.58s.
```
### What browser are you using? (if relevant)
Firefox 108.0b3
### How are you deploying your application? (if relevant)
N/A
### Describe the Bug
Using a catchall route like `/[...slug]` with the new experimental Edge runtime fails with a "catch-all must be the last part of the URL" error message, and it fails to compile/load the requested page:
```
error - Error: Catch-all must be the last part of the URL.
at <unknown> (webpack-internal:///(sc_client)/./node_modules/next/dist/esm/shared/lib/router/utils/sorted-routes.js:53)
at UrlNode._insert (webpack-internal:///(sc_client)/./node_modules/next/dist/esm/shared/lib/router/utils/sorted-routes.js:53:19)
at UrlNode._insert (webpack-internal:///(sc_client)/./node_modules/next/dist/esm/shared/lib/router/utils/sorted-routes.js:135:40)
at UrlNode.insert (webpack-internal:///(sc_client)/./node_modules/next/dist/esm/shared/lib/router/utils/sorted-routes.js:7:14)
at eval (webpack-internal:///(sc_client)/./node_modules/next/dist/esm/shared/lib/router/utils/sorted-routes.js:158:46)
at Array.forEach (<anonymous>)
at getSortedRoutes (webpack-internal:///(sc_client)/./node_modules/next/dist/esm/shared/lib/router/utils/sorted-routes.js:158:21)
at NextWebServer.getDynamicRoutes (webpack-internal:///(sc_client)/./node_modules/next/dist/esm/server/base-server.js:382:89)
at NextWebServer.generateRoutes (webpack-internal:///(sc_client)/./node_modules/next/dist/esm/server/web-server.js:259:39)
at new Server (webpack-internal:///(sc_client)/./node_modules/next/dist/esm/server/base-server.js:143:80)
at new NextWebServer (webpack-internal:///(sc_client)/./node_modules/next/dist/esm/server/web-server.js:34:9) {
page: '/[...slug]'
}
```
### Expected Behavior
Requested route should be matched to the `[...slug]` catchall route, rendering its `page.tsx` with slug in params
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://codesandbox.io/p/sandbox/blazing-breeze-n8xme9
### To Reproduce
**Using the reproduction:** click on the hyperlink in the reproduction which should navigate you to `/test/other/page`, but this produces the error mentioned above.
**Locally:** in a Next.js 13 project, set `experimental.runtime = 'experimental-edge'` in `next.config.js`, and add a new folder, `[...slug]` to `app/` dir with a `page.tsx` file. Try to load a route that should match this e.g. `/test/other/page`.
----
Finally would like to say I'm loving Next 13 and the new `app/` dir, this new overall approach with server components and data fetching feels very intuitive and neat... well done to the team! 👏 👏
<sub>[NEXT-652](https://linear.app/vercel/issue/NEXT-652/[next-13-app-dir-edge-runtime]-catch-all-route-produces-error-in-dev)</sub> | https://github.com/vercel/next.js/issues/43384 | https://github.com/vercel/next.js/pull/50313 | 12e22edd747dc1e98f75492009ca784fa0d9fc01 | 027aa72f4716ed852c7d9b36f7afd2a793cad4f7 | "2022-11-25T15:31:27Z" | javascript | "2023-05-25T03:30:54Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,367 | ["packages/next/build/index.ts", "packages/next/build/utils.ts", "test/e2e/app-dir/standalone.test.ts"] | NextJS 13 and Docker | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 16.15.0
npm: 8.5.5
Yarn: 1.22.15
pnpm: 6.11.0
Relevant packages:
next: 13.0.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### Which example does this report relate to?
with-docker
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
If you try to enable and use the app directory experimental feature, once you run the container you get a 404 - Not found message
### Expected Behavior
To see the content of the page
### To Reproduce
1. enable the experimental feature in the `next.config.js` file:
```js
/** @type {import('next').NextConfig} */
module.exports = {
experimental: {
appDir: true
},
output: 'standalone',
}
```
2. rename `pages` folder into `app` folder
3. rename `index.js` into `page.js`
4. build the image with `docker build -t nextjs-docker .`
5. run the image with `docker run -p 3000:3000 nextjs-docker`
6. open the browser and go to `http://localhost:3000` | https://github.com/vercel/next.js/issues/43367 | https://github.com/vercel/next.js/pull/43746 | ee266b9d9b3ceefa6410cf0f186468e46d18d279 | 482d78e1c24f5d4fc6509417f25a95f1b29acca2 | "2022-11-25T09:58:59Z" | javascript | "2022-12-13T03:06:40Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,354 | ["docs/api-reference/next.config.js/disabling-http-keep-alive.md"] | Docs: Cannot add agent option in fetch() call | ### What is the improvement or update you wish to see?
The current docs for ["Disabling HTTP Keep-Alive"](https://nextjs.org/docs/api-reference/next.config.js/disabling-http-keep-alive) mentions it is possible to set the `agent` option in an individual `fetch()` call. However as of Next.js 13.0.4, this produces a type error.
The `fetch` type comes from the TypeScript `lib.dom.d.ts` which does not allow for specifying the `agent` because it is a client-side definition of `fetch` in the browser.
<img width="1041" alt="image" src="https://user-images.githubusercontent.com/484912/203883817-0e95d675-cded-4b67-b15a-62636ad1a334.png">
Repro: https://stackblitz.com/edit/vercel-next-js-bar5lp?file=pages/index.tsx
### Is there any context that might help us understand?
I think the confusion arises because Next.js automatically polyfills `node-fetch` where the [`agent` option is applicable](https://github.com/node-fetch/node-fetch#custom-agent), I'm not sure how TypeScript type could distinguish between the `fetch` being used on the server-side or client-side.
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/api-reference/next.config.js/disabling-http-keep-alive | https://github.com/vercel/next.js/issues/43354 | https://github.com/vercel/next.js/pull/43374 | 9855fd7bc51ae49d3b8e59f1beefa0cee43c6d3e | 2f79baf94b616e19dad995101768ffffaac4c691 | "2022-11-25T01:54:20Z" | javascript | "2022-12-19T22:54:12Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,330 | ["packages/next/taskfile.js"] | "next/app" default export is wrapped in { default: ... } when "type": "module" | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022
Binaries:
Node: 18.7.0
npm: 8.15.0
Yarn: 1.22.19
pnpm: 7.14.2
Relevant packages:
next: 13.0.5-canary.3
eslint-config-next: 13.0.4
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
#43206 Same happens in next/app
### Expected Behavior
App should always just be [Function: App]
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
I think it's just another duplicate form of #43206, but if reproduction is needed I'll add
### To Reproduce
I think it's just another duplicate form of #43206, but if reproduction is needed I'll add | https://github.com/vercel/next.js/issues/43330 | https://github.com/vercel/next.js/pull/43335 | a746597430bd111b321e6e656ba6120311c43736 | bcb0e282018045cba63090cc90451f4e5d08d3d7 | "2022-11-24T12:50:30Z" | javascript | "2022-11-24T17:10:45Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,221 | ["examples/with-msw/package.json"] | with-msw example crashes with ERR_UNSUPPORTED_DIR_IMPORT error | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000
Binaries:
Node: 18.7.0
npm: 8.15.0
Yarn: 1.22.18
pnpm: 7.17.0
Relevant packages:
next: 13.0.5-canary.4
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### Which example does this report relate to?
with-msw
### What browser are you using? (if relevant)
Chrome 107.0.5304.87 (Official Build) (arm64)
### How are you deploying your application? (if relevant)
next dev
### Describe the Bug
This error shows up when accessing http://localhost:3000:
```
error - unhandledRejection: Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import './with-msw-app/node_modules/@mswjs/interceptors/lib/interceptors/ClientRequest' is not supported resolving ES modules imported from ./with-msw-app/node_modules/msw/lib/node/index.mjs
Did you mean to import @mswjs/interceptors/lib/interceptors/ClientRequest/index.js?
at new NodeError (node:internal/errors:387:5)
at finalizeResolution (node:internal/modules/esm/resolve:400:17)
at moduleResolve (node:internal/modules/esm/resolve:965:10)
at defaultResolve (node:internal/modules/esm/resolve:1173:11)
at nextResolve (node:internal/modules/esm/loader:173:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:852:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:439:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36) {
code: 'ERR_UNSUPPORTED_DIR_IMPORT',
url: 'file:///with-msw-app/node_modules/@mswjs/interceptors/lib/interceptors/ClientRequest'
}
```
### Expected Behavior
No error should be displayed when accessing http://localhost:3000 and MSW should intercept the first render request (couldn't test it).
### To Reproduce
1. npx create-next-app --example with-msw with-msw-app
2. cd with-msw-app
3. yarn dev
You should see the error message in the console when trying to access http://localhost:3000. | https://github.com/vercel/next.js/issues/43221 | https://github.com/vercel/next.js/pull/43224 | 7ae1cb8e8dd6af530bee80c7c76d56bee515a666 | f400adf5e9a5a5471cb0b800a5c336b07cab8d3b | "2022-11-22T08:06:32Z" | javascript | "2022-11-22T10:33:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,206 | ["packages/next/taskfile.js"] | "next/error" default export is wrapped in { default: ... } when "type": "module" | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: linux
Arch: x64
Version: #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022
Binaries:
Node: 18.7.0
npm: 8.15.0
Yarn: 1.22.19
pnpm: 7.14.2
Relevant packages:
next: 13.0.5-canary.3
eslint-config-next: 13.0.4
react: 18.2.0
react-dom: 18.2.0
```
### Describe the Bug
If I run
```js
import Error from "next/error"
```
then `Error` normally is `[Function: Error]`. However, under the following circumstances, `Error` is `{ default: [Function: Error] }` instead:
1. If the Next.js app has [`"type": "module"`](https://nodejs.org/api/packages.html#type) set in its `package.json`, so that Node treats `.js` files as ES6 modules, *and*
2. if the import happens in a `.js` file, not a `.ts` file.
I assume this is because of some CommonJS/ES6 interoperability issue.
Other Next.js modules seem to work fine with `"type": "module"`. For example, `import Head from "next/head"` works fine in `.js` and `.ts` files. However, I haven't checked if `"next/error"` is really the only module where this happens. Once you identify the cause, it might be worth checking if there are other modules that don't work.
### Expected Behavior
`Error` should always just be `[Function: Error]`.
Alternatively, if this is difficult to fix, it might be worth adding linter rule against `"type": "module"` in `package.json` to warn that this is unsupported.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/joliss/next-import-problem
### To Reproduce
Run `npm install; npm run dev`, and open http://localhost:3000/. The terminal prints:
```
with JS, Error = {
default: [Function: Error] {
displayName: 'ErrorPage',
getInitialProps: [Function: _getInitialProps],
origGetInitialProps: [Function: _getInitialProps]
}
}
with TS, Error = [Function: Error] {
displayName: 'ErrorPage',
getInitialProps: [Function: _getInitialProps],
origGetInitialProps: [Function: _getInitialProps]
}
```
See the files `import-test-js.js` and `import-test-ts.ts`. | https://github.com/vercel/next.js/issues/43206 | https://github.com/vercel/next.js/pull/43238 | 0caf8000e72cf5867139d75212382db8f49e8a09 | 3f30e26a3a3a919c7f2ca5746488533b961f211d | "2022-11-21T21:48:52Z" | javascript | "2022-11-23T05:37:18Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,195 | ["packages/next/build/webpack/plugins/flight-types-plugin.ts"] | Type error: 'PageComponent' is declared but never used | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
⚡nekodex ❯❯ pnpm exec next info
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Wed Nov 2 19:50:29 UTC 2022
Binaries:
Node: 18.11.0
npm: 8.19.2
Yarn: 3.2.4
pnpm: 7.13.5
Relevant packages:
next: 13.0.5-canary.3
eslint-config-next: 13.0.4
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
Microsoft Edge 107.0.1418.52
### How are you deploying your application? (if relevant)
next build
### Describe the Bug
When I try to compile my application with "next build", eslint complains about "PageComponent" being declared but never used.
I looked where that declaration was because I didn't have any variable with that name, then I see that in the "types" folder inside the "next" folder that is autogenerated by next.



### Expected Behavior
A successful compilation with no slint errors.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
None.
### To Reproduce
1. Create a nextjs project
2. Run `next build` | https://github.com/vercel/next.js/issues/43195 | https://github.com/vercel/next.js/pull/43226 | 3a2af8fb0bdaabc7ca5ae7f06ddd929c91b0c88c | 7596132a0cb8d5730463a4c2353dffac4a14ff79 | "2022-11-21T17:19:55Z" | javascript | "2022-11-22T12:49:01Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,157 | ["errors/app-static-to-dynamic-error.md", "errors/manifest.json", "packages/next/src/server/base-server.ts", "test/e2e/app-dir/app-static/app-static.test.ts", "test/e2e/app-dir/app-static/app/static-to-dynamic-error-forced/[id]/page.js", "test/e2e/app-dir/app-static/app/static-to-dynamic-error/[id]/page.js"] | Random Vercel runtime errors invariant: invalid Cache-Control duration provided: 0 < 1 | ### 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 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64
Binaries:
Node: 16.18.0
npm: 8.19.2
Yarn: 1.22.19
pnpm: 7.15.0
Relevant packages:
next: 13.0.5-canary.2
eslint-config-next: 13.0.4
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome 107.0.5304.110
### How are you deploying your application? (if relevant)
Vercel
### Describe the Bug
I'm experiencing this error for seemingly random pages on my site using `appDir`.
I am not changing the default caching options, and other pages of the same segment load fine, though once a page experiences this error, it seems to stick.
These errors don't repro on dev or local build; only on Vercel.
```
[GET] /titles/8587
18:25:23:52
2022-11-20T00:25:25.933Z 494244e3-c28b-4fe7-bb20-aa189128b892 ERROR Error: invariant: invalid Cache-Control duration provided: 0 < 1
at Object.setRevalidateHeaders (/var/task/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/send-payload/revalidate-headers.js:13:19)
at Object.sendRenderResult (/var/task/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/send-payload/index.js:62:33)
RequestId: 494244e3-c28b-4fe7-bb20-aa189128b892 Error: Runtime exited with error: exit status 1
Runtime.ExitError
```
### Expected Behavior
These pages should load fine with no errors.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/transitive-bullshit/next-movie/tree/feature/next-themes-beta
### To Reproduce
1. Visit https://next-movie-ainytmtbp-saasify.vercel.app/titles/8587
2. Notice the 500 error
3. Check the vercel function logs for the above error
The branch in question for the repro case uses cookies via https://github.com/pacocoursey/next-themes/issues/152 which may be related. | https://github.com/vercel/next.js/issues/43157 | https://github.com/vercel/next.js/pull/44989 | cefb30b32bc05fcb46058a6e8b1ff545fb9ddf1d | 6b7c69fa4d773d76730272158e2fe7fed12e03aa | "2022-11-20T22:08:40Z" | javascript | "2023-01-18T18:24:35Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,134 | ["packages/next/src/client/image-component.tsx", "test/integration/next-image-new/app-dir/app/priority/page.js", "test/integration/next-image-new/app-dir/test/index.test.ts", "test/integration/next-image-new/default/pages/priority.js", "test/integration/next-image-new/default/test/index.test.ts", "test/unit/next-image-new.test.ts"] | [NEXT-811] [appDir] `next/image` with `priority` doesn't generate `<link rel="preload" ...>` tag. | ### 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.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64
Binaries:
Node: 18.10.0
npm: 8.19.2
Yarn: 1.22.19
pnpm: 7.13.0
Relevant packages:
next: 13.0.5-canary.2
eslint-config-next: 13.0.4
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
When using `pages` directory, the `<Image />` component from `next/image` with `priority` prop will generate a `<link rel="preload" as="image" ... />` on the `<head />`. But this is not the case when using `app` directory.
I believe this is because, currently, the `<link>` tag is injected using `next/head` on a client component ([reference](https://github.com/vercel/next.js/blob/ecfd2f4cd6a1c3f6bc3cd1cca6b62a3cb705a4e2/packages/next/client/image.tsx#L899-L912)). This doesn't work given the server component setup.
### Expected Behavior
`<link rel="preload" as="image" ... />` will also be generated for priority `<Image />` when using `app` directory.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/kvnang/next-image-preload
### To Reproduce
```bash
git clone https://github.com/kvnang/next-image-preload
cd next-image-preload
npm run build && npm run start
```
Under `/app/page.tsx`, the `<Image />` component with src `vercel.svg` has a `priority` prop set to `true`, and thus should produce `<link rel="preload" />` tag. But it doesn't in this case.
<sub>[NEXT-811](https://linear.app/vercel/issue/NEXT-811/[appdir]-nextimage-with-priority-doesnt-generate-link-rel=preload-tag)</sub> | https://github.com/vercel/next.js/issues/43134 | https://github.com/vercel/next.js/pull/52425 | d10f105b74d4af6408ee7917498f38b257ba1f04 | c3ca17cf02cdd13555965db8196c2ce4c7bf192b | "2022-11-19T19:07:54Z" | javascript | "2023-07-14T15:36:35Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,080 | ["packages/next/build/webpack-config.ts", "test/e2e/app-dir/rsc-basic.test.ts", "test/e2e/app-dir/rsc-basic/app/css-in-js/edge/page.js"] | useServerInsertedHTML's callback is not called when experimental-edge flag is enabled | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
npx --no-install next info
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101
Binaries:
Node: 18.9.0
npm: 8.19.1
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.4-canary.5
eslint-config-next: 13.0.4
react: 18.2.0
react-dom: 18.2.0
warn - Latest canary version not detected, detected: "13.0.4-canary.5", newest: "13.0.4".
Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
Read more - https://nextjs.org/docs/messages/opening-an-issue
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
Cloudflare Pages
### Describe the Bug
I created a new Next 13 + styled-components app by following [the beta docs](https://beta.nextjs.org/docs/styling/css-in-js#styled-components) and I was able to get it to work to render a stateless component with some basic styling.
Then when I enabled `experimental-edge` runtime on next.config.js (to deploy Edge API Routes to Cloudflare Pages), none of the styling is being applied. From a quick debugging, I found that the callback passed to `useServerInsertedHTML` in RootStyleRegistry.tsx never gets called.
Note: there is a similar, but possibly unrelated issue with dynamic styling, which is already tracked in [styled-components repo](https://github.com/styled-components/styled-components/issues/3856).
### Expected Behavior
I expect the callback that I passed to `useServerInsertedHTML` to be called at least once so that the app contains server-rendered stylesheet.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/itsuka-dev/memoire
### To Reproduce
1. run `yarn dev`
2. open localhost:3000
3. observe that the text on the page does not have any styling applied from `Title` component (e.g. `font-family`) | https://github.com/vercel/next.js/issues/43080 | https://github.com/vercel/next.js/pull/43302 | e901feffc30b6c9d410cbc7c144e4ac752993087 | e581dc81dde8d9e88253cb5c58e06c5127933fed | "2022-11-18T14:16:11Z" | javascript | "2022-11-23T18:01:16Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,060 | ["package.json", "packages/next-swc/Cargo.lock", "packages/next-swc/crates/core/Cargo.toml", "packages/next-swc/crates/core/tests/loader/issue-30389/output.js", "packages/next-swc/crates/napi/Cargo.toml", "packages/next-swc/crates/wasm/Cargo.toml", "packages/next/package.json", "pnpm-lock.yaml", "test/unit/next-swc.test.ts"] | Compilation result does not conform to expectation | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:52 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8112
Binaries:
Node: 16.15.0
npm: 8.5.5
Yarn: 1.22.15
pnpm: N/A
Relevant packages:
next: 13.0.3
eslint-config-next: 12.1.5
react: 18.2.0
react-dom: 18.2.0
```
### Which example does this report relate to?
-
### What browser are you using? (if relevant)
Chrome 107.0.5304.110
### How are you deploying your application? (if relevant)
next start
### Describe the Bug
The development mode is normal, but the compiled results run abnormally.
Question 1
---
```javascript
let str1 = "Hello";
let str2 = " world"
let result = false ? 'wss' : 'https';
result += `://${str1}`;
result += str2;
// ://Hello world
console.log(result);
```
Question 2
---
Some styles will be ignored in the build result.

### Expected Behavior
Question 1
---
```javascript
// https://Hello world
console.log(result);
```
Question 2
---

### To Reproduce
```javascript
let str1 = "Hello";
let str2 = " world"
let result = false ? 'wss' : 'https';
result += `://${str1}`;
result += str2;
console.log(result);
``` | https://github.com/vercel/next.js/issues/43060 | https://github.com/vercel/next.js/pull/42977 | f4b4c09f94c38c9a4c3936d2ae938ef6f125757e | 3d62f467cf4644e3e087f8db954d0db7156c69ea | "2022-11-18T04:55:44Z" | javascript | "2022-11-20T02:18:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,059 | ["packages/next/export/worker.ts", "test/e2e/app-dir/app-static.test.ts", "test/e2e/app-dir/app-static/app/dynamic-error/page.js"] | Dynamic = 'error' throws exception on very simple static page | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 17.8.0
npm: 8.19.2
Yarn: 1.22.19
pnpm: 7.16.1
Relevant packages:
next: 13.0.4-canary.5
eslint-config-next: 13.0.3
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
I have a freshly installed next@canary build (`yarn create next-app --experimental-app`).
I created a simple page with the following code (located in `app/test/page.tsx`):
```typescript
export const dynamic = "error"
export default function Page() {
return <div>Nice!</div>
}
```
When running `yarn build`, I get an exception:
```bash
Error occurred prerendering page "/test". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Page with dynamic = "error" encountered dynamic data method /test.
at /Users/colinarms/src/nextplayground/test/node_modules/next/dist/export/worker.js:192:31
at async Span.traceAsyncFn (/Users/colinarms/src/nextplayground/test/node_modules/next/dist/trace/trace.js:79:20)
```
This is a very simple static page with no dynamic fetches, so `dynamic = 'error'` shouldn't throw any exceptions.
### Expected Behavior
The static page should get generated with no issue.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/seeARMS/nextjs-dynamic-repro
### To Reproduce
1. Git clone repo
2. Run `yarn build`
3. Exception occurs and build fails | https://github.com/vercel/next.js/issues/43059 | https://github.com/vercel/next.js/pull/43377 | eaaa193751f421c19eaaad183831f5450702fe46 | 93613d550913de1cfe9ad6979d0fa58304c877be | "2022-11-18T04:52:40Z" | javascript | "2022-11-26T00:39:30Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,052 | [".github/workflows/build_test_deploy.yml", "packages/next-swc/Cargo.lock", "packages/next-swc/crates/core/Cargo.toml", "packages/next-swc/crates/napi/Cargo.toml", "packages/next-swc/crates/wasm/Cargo.toml", "packages/next-swc/package.json", "turbo.json"] | using @w3ui/react-uploader UploaderProvider in a Next.js app with SWC minification enabled breaks in production builds | ### 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 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64
Binaries:
Node: 16.13.1
npm: 8.1.2
Yarn: 1.22.19
pnpm: 7.13.4
Relevant packages:
next: 13.0.4-canary.3
eslint-config-next: 13.0.3
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Brave Version 1.45.127 Chromium: 107.0.5304.110 (Official Build) (x86_64)
### How are you deploying your application? (if relevant)
next start
### Describe the Bug
If I use the `UploaderProvider` from `w3ui/react-uploader` in my app it works fine in dev mode (`npm run dev`) but the app throws errors (https://reactjs.org/docs/error-decoder.html/?invariant=130&args[]=undefined&args[]= and https://reactjs.org/docs/error-decoder.html/?invariant=423) when run in a production build with SWC minification enabled (`npm run build && npm start`).
Disabling SWC minification in Next 12, 13 or canary fixes the issue.
### Expected Behavior
Apps using `UploaderProvider` should work the same in development and production mode, with SWC minification enabled or disabled.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/web3-storage/w3ui-swc-minify-bug
### To Reproduce
Clone https://github.com/web3-storage/w3ui-swc-minify-bug and run `npm install && npm run build && npm start` and then visit http://localhost:3000
Disable SWC minification (as demonstrated on this branch https://github.com/web3-storage/w3ui-swc-minify-bug/tree/fixed) to fix this issue. The issue also does not occur when running with `npm run dev`. | https://github.com/vercel/next.js/issues/43052 | https://github.com/vercel/next.js/pull/43983 | ea7d85687bae92ebdb5c51ebc59173e01db7b7e0 | 3dd9af785c3554305ad86fcf400ed11a7e891c3e | "2022-11-17T21:08:03Z" | javascript | "2022-12-19T21:10:02Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,042 | ["package.json", "packages/next-swc/Cargo.lock", "packages/next-swc/crates/core/Cargo.toml", "packages/next-swc/crates/core/tests/loader/issue-30389/output.js", "packages/next-swc/crates/napi/Cargo.toml", "packages/next-swc/crates/wasm/Cargo.toml", "packages/next/package.json", "pnpm-lock.yaml", "test/unit/next-swc.test.ts"] | `next build` breaks @microsoft/signalr [v13.0.3, canary] | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103
Binaries:
Node: 18.7.0
npm: 8.15.0
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.4-canary.3
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
The built app doesn't behave as the dev app, see screenshot
<img width="602" alt="Screenshot 2022-11-17 at 16 53 42" src="https://user-images.githubusercontent.com/1120395/202498460-c3428b17-242e-4181-8319-97874226aed4.png">
I was able to identify the function in https://www.npmjs.com/package/@microsoft/signalr that doesn't compile correctly
(the reproduction code contains only this function)
```js
function resolveNegotiateUrl(url) {
const index = url.indexOf("?");
let negotiateUrl = url.substring(0, index === -1 ? url.length : index);
if (negotiateUrl[negotiateUrl.length - 1] !== "/") {
negotiateUrl += "/";
}
negotiateUrl += "negotiate";
negotiateUrl += index === -1 ? "" : url.substring(index);
if (negotiateUrl.indexOf("negotiateVersion") === -1) {
negotiateUrl += index === -1 ? "?" : "&";
negotiateUrl += "negotiateVersion=1";
}
return negotiateUrl;
}
```
I pasted the function into the [SWC playground](https://play.swc.rs/?version=1.3.18&code=H4sIAAAAAAAAA32QTQ6CMBCF9z3F2IWpUVS2koYb6Eo3xoXigE2akrTFmBjubik%2FAhF37bx5b76ZtFCJFbkCjSaXT9xjlltxtXjUkhVaLuBNAJJcGQtC3fEFHFx57d%2BHlNGYLiLXIdGC6nmbNlPcjNVCZWy7av2cQxBC7HWJKrMP2NWaTxIpsH7Suf9pDQGEF5i5JLqhNSIMxy%2B9VOWV5IfUFXzLWB6BUuoAh9tM434v01VPqI07sQOtI6eAx2Pjai6de8R%2FOzT5POz21WgLrQaWiJTkAxl4R9XtAQAA&config=H4sIAAAAAAAAA0WNSw6DMAxE7%2BI123bBHXqIKDUoVX7yGKkoyt3rABU7ez5vGn3gaW5UnYBlXNizui%2FNpHtleAlVaSKFSYuL4G6Pk5XVIoyHebEU8OVOlEIOyz5IvqQqDNyWy2v8J7uBUnlvQ2jH2AF8Ur8ZKpvVAl5X7iz%2BAPJfOO21AAAA) but I couldn't reproduce the issue.
### Expected Behavior
The application behaves the same in dev and build mode.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/acoiro/next-13.0.3-build-bug
### To Reproduce
Run the reproduction code
```sh
git clone [email protected]:acoiro/next-13.0.3-build-bug.git
cd next-13.0.3-build-bug
npm install
npm run dev
```
Navigate to http://localhost:3000/ and see the correct output.
Now build and run the app
```sh
npm run build && npm start
```
Navigate to http://localhost:3000/ and see a different output. | https://github.com/vercel/next.js/issues/43042 | https://github.com/vercel/next.js/pull/42977 | f4b4c09f94c38c9a4c3936d2ae938ef6f125757e | 3d62f467cf4644e3e087f8db954d0db7156c69ea | "2022-11-17T16:43:09Z" | javascript | "2022-11-20T02:18:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,040 | ["packages/font/src/google/loader.ts", "packages/font/src/google/utils.ts", "test/e2e/next-font/app/pages/variable-font-without-weight-range.js", "test/e2e/next-font/google-font-mocked-responses.js", "test/e2e/next-font/index.test.ts", "test/unit/google-font-loader.test.ts"] | `Selector "body" is not pure` when using Google fonts with colors. | ### 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.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64
Binaries:
Node: 18.10.0
npm: 8.19.2
Yarn: 1.22.0
pnpm: N/A
Relevant packages:
next: 13.0.4-canary.3
eslint-config-next: 13.0.3
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Google Fonts that define CSS variables in body causes errors.
For example:
```
const nabla = Nabla({ weight: "400", subsets: ["latin"] });
```
Results in:
```
./node_modules/@next/font/google/target.css?{"path":"app/page.tsx","import":"Nabla","arguments":[{"weight":"400","subsets":["latin"]}],"variableName":"nabla"}:46:1
Syntax error: Selector "body" is not pure (pure selectors must contain at least one local class or id)
44 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
45 | }
> 46 | body {
| ^
47 | --google-font-color-nabla:colrv1;
48 | }
```
```
event - compiled client and server successfully in 608 ms (199 modules)
wait - compiling /page (client and server)...
error - Failed to find font override values for font `Nabla`
error - Failed to find font override values for font `Nabla`
error - ./node_modules/@next/font/google/target.css?{"path":"app/page.tsx","import":"Nabla","arguments":[{"weight":"400","subsets":["latin"]}],"variableName":"nabla"}:46:1
Syntax error: Selector "body" is not pure (pure selectors must contain at least one local class or id)
44 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
45 | }
> 46 | body {
| ^
47 | --google-font-color-nabla:colrv1;
48 | }
wait - compiling /_error (client and server)...
error - Failed to find font override values for font `Nabla`
error - Failed to find font override values for font `Nabla`
error - Failed to find font override values for font `Nabla`
error - ./node_modules/@next/font/google/target.css?{"path":"app/page.tsx","import":"Nabla","arguments":[{"weight":"400","subsets":["latin"]}],"variableName":"nabla"}:46:1
Syntax error: Selector "body" is not pure (pure selectors must contain at least one local class or id)
44 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
45 | }
> 46 | body {
| ^
47 | --google-font-color-nabla:colrv1;
48 | }
<w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'Compilation/modules|javascript/auto|/Users/cdorrestijn/Development/cache-test/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[5].oneOf[4].use[0]!/Users/cdorrestijn/Development/cache-test/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[5].oneOf[4].use[1]!/Users/cdorrestijn/Development/cache-test/node_modules/@next/font/google/target.css?{"path":"app/page.tsx","import":"Nabla","arguments":[{"weight":"400","subsets":["latin"]}],"variableName":"nabla"}|sc_server': No serializer registered for CssSyntaxError
<w> while serializing webpack/lib/cache/PackFileCacheStrategy.PackContentItems -> webpack/lib/NormalModule -> webpack/lib/ModuleBuildError -> CssSyntaxError
<w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'Compilation/modules|/Users/cdorrestijn/Development/cache-test/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[3].oneOf[4].use[1]!/Users/cdorrestijn/Development/cache-test/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[3].oneOf[4].use[2]!/Users/cdorrestijn/Development/cache-test/node_modules/@next/font/google/target.css?{"path":"app/page.tsx","import":"Nabla","arguments":[{"weight":"400","subsets":["latin"]}],"variableName":"nabla"}': No serializer registered for CssSyntaxError
<w> while serializing webpack/lib/cache/PackFileCacheStrategy.PackContentItems -> webpack/lib/NormalModule -> webpack/lib/ModuleBuildError -> CssSyntaxError
```
### Expected Behavior
The extra CSS is loaded correctly.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://codesandbox.io/s/musing-flower-xhju0l?file=/pages/index.tsx
### To Reproduce
See reproduction link
Or include this snippet in your project:
```
const nabla = Nabla({ weight: "400", subsets: ["latin"] });
``` | https://github.com/vercel/next.js/issues/43040 | https://github.com/vercel/next.js/pull/43036 | 8e7c45bfe0dd712cf045335f8ae2a8fa03146c27 | 397894b133f11432b80c18f41fd4bc555c85044e | "2022-11-17T15:32:17Z" | javascript | "2022-11-17T16:52:19Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,037 | ["packages/next/build/index.ts", "packages/next/build/utils.ts", "test/e2e/app-dir/app/next.config.js", "test/e2e/app-dir/index.test.ts"] | Next 13 with appDir routes not found with standalone build | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.3
eslint-config-next: 13.0.3
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome 107.0.5304.107
### How are you deploying your application? (if relevant)
Docker, next build with standalone option
### Describe the Bug
Next 13 with appDir and standalone output option returns a 404 page for pages in /app when following the next with docker example. API routes (in the /pages/api folder) work just fine, however. The pages in /app also do not seem to be in .next/standalone.
### Expected Behavior
The routes should not return 404
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/jochim-vd/test
### To Reproduce
Run `npm run build` and run `node server.js` in `.next/standalone`. Navigate to localhost:3000 and a 404 page will be shown. | https://github.com/vercel/next.js/issues/43037 | https://github.com/vercel/next.js/pull/43268 | 60d5c9615c8afcda0bea7dfa7f75989fbb954695 | 2eaa3ae14651779116ed2ccd5c27a4a9d1d05752 | "2022-11-17T14:07:32Z" | javascript | "2022-11-24T02:45:19Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,027 | ["package.json", "packages/next-swc/Cargo.lock", "packages/next-swc/crates/core/Cargo.toml", "packages/next-swc/crates/core/tests/loader/issue-30389/output.js", "packages/next-swc/crates/napi/Cargo.toml", "packages/next-swc/crates/wasm/Cargo.toml", "packages/next/package.json", "pnpm-lock.yaml", "test/unit/next-swc.test.ts"] | dropzone.js can't be loaded if I use swc | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103
Binaries:
Node: 19.0.1
npm: 8.19.2
Yarn: 1.22.19
pnpm: 7.16.0
Relevant packages:
next: 13.0.3
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
I use dropzone.js for my nextjs project. I can use it in dev mode, but can't use it for ssg mode.
If I export for ssg, I get the error: `extend is not defined`.
Then I try to use `dynamic import` with `ssr: false`, nothing has changed, it's returns same error.
But, If I disable `swcMinify`, it can be used.
P.S. I disable it, but output file size is smaller. why?
### Expected Behavior
dropzone.js can be use for ssg with swcMinify.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/0ldm0s/dropzone-demo
### To Reproduce
set `swcMinify: true` in `next.config.js` | https://github.com/vercel/next.js/issues/43027 | https://github.com/vercel/next.js/pull/42977 | f4b4c09f94c38c9a4c3936d2ae938ef6f125757e | 3d62f467cf4644e3e087f8db954d0db7156c69ea | "2022-11-17T08:39:49Z" | javascript | "2022-11-20T02:18:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,019 | ["packages/next/server/lib/find-page-file.ts", "test/unit/find-page-file.test.ts"] | :bug: `13.0.4-canary.3` can't find `page.tsx` in app dir with `next dev` | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
- Operating System:
1. Platform: win32
1. Arch: x64
1. Version: Windows 10 Pro
- Binaries:
1. Node: 16.15.1
1. npm: N/A
1. Yarn: N/A
1. pnpm: N/A
- Relevant packages:
1. next: 13.0.4-canary.3
1. eslint-config-next: N/A
1. react: 18.2.0
1. react-dom: 18.2.0
### What browser are you using? (if relevant)
not relevant
### How are you deploying your application? (if relevant)
not relevant
### Describe the Bug
`13.0.4-canary.3` work incorrectly with `next dev`, because `index.tsx` just be found in `pages` folder.
But next do check the conflict if I put the `page.tsx` in the root of `app` folder.
However `page.tsx` still can't be found, it will return 404 page in the browser.
> `pages/index.tsx` with `next dev`
> 
> `app/page.tsx` or `app/(main)/page.tsx` with `next dev`
> 
But `appDir` work fine in production build on vercel
### Expected Behavior
The route system should work correctly in `13.0.4-canary.3`
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/Chia1104/with-next-13.0.4-canary.3
### To Reproduce
given above | https://github.com/vercel/next.js/issues/43019 | https://github.com/vercel/next.js/pull/43057 | 2f744a1ae32a65f1362af0957e3c57f33d102914 | 22b16e1e37f253236c8508bb68280b2ce2c5ca37 | "2022-11-17T03:23:40Z" | javascript | "2022-11-18T01:30:01Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 43,001 | ["packages/next/cli/next-dev.ts"] | function style `next.config.js` seems to be ignored when `--turbo` enabled | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Thu, 10 Nov 2022 21:14:24 +0000
Binaries:
Node: 16.17.1
npm: 9.1.1
Yarn: 1.22.19
pnpm: 7.5.2
Relevant packages:
next: 13.0.4-canary.2
eslint-config-next: 13.0.3
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
## Overview
When write up configuration as function style in `next.config.js` and run `next dev --turbo`, the configuration is ignored. This is not produced when using object export.
- When I write config like this, "myConfig" is ignored by turbopack
```javascript
module.exports = (phase, { defaultConfig }) => {
/** @type {import('next').NextConfig} */
const myConfig = {
/* custom configuration */
}
return config
}
```
- This style has no problem (as used [this example](https://github.com/vercel/next.js/tree/canary/examples/with-turbopack) and as documented [here](https://nextjs.org/docs/advanced-features/turbopack))
```javascript
/** @type {import('next').NextConfig} */
const myConfig = {
/* custom configuration */
}
module.exports = myConfig
```
### Matrix
||w/o `--turbo`|`--turbo`|
|---|---|---|
|**object export**|OK|OK|
|**function export**|OK|NG (this issue)|
### Expected Behavior
The function style nextConfig loaded properly in case of `--turbo` option passed to `next dev`.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/h-takeyeah/nextjs-bug-report/tree/funcconf-turbo
### To Reproduce
1. Clone my repository [here](https://github.com/h-takeyeah/nextjs-bug-report/tree/funcconf-turbo)
3. `npm i`
4. `npm run dev`
That repository is copy of an example project, *with-turbopack*.
Then you will see the process exits. It is expected that server boots and starts to listen.
:memo: The configuration `next.config.js` is seems to take effect when omitting `--turbo` (i.e. just `npx next dev`). | https://github.com/vercel/next.js/issues/43001 | https://github.com/vercel/next.js/pull/43015 | 443f74dbdb6ea17b51ff18c3e7bce14d0a2d5413 | 2500c8b4436a10ce79538e3ff02d82d653717e22 | "2022-11-16T16:23:22Z" | javascript | "2022-11-16T23:40:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,972 | ["packages/next/build/index.ts", "packages/next/server/dev/next-dev-server.ts", "packages/next/server/lib/find-page-file.ts", "test/e2e/app-dir/app/app/catch-all/[...slug]/not-a-page.js", "test/e2e/app-dir/app/app/catch-all/[...slug]/page.js", "test/e2e/app-dir/index.test.ts", "test/unit/find-page-file.test.ts"] | [appDir] Co-located components in catch-all slug causes error if named with "page" in name | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Wed Mar 2 00:30:59 UTC 2022
Binaries:
Node: 16.18.1
npm: 9.1.1
Relevant packages:
next: 13.0.4-canary.2
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
If you [co-locate](https://beta.nextjs.org/docs/routing/fundamentals#colocation) a component in a [catch-all segment (`[...slug]`)](https://beta.nextjs.org/docs/routing/defining-routes#catch-all-and-optional-catch-all-segments) with a name that ends with `page.(js|tsx?)`, you get `Error: Catch-all must be the last part of the URL.`
### Expected Behavior
Either it works, or better error message and documentation.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/oBusk/catch-all-components
### To Reproduce
Using `appDir`, create a catch-all segment.
```
📁 [...slug]
📜 page.tsx
```
Now you want to have some component co-located with the page code. If you name it any of
- `[...slug]/page.client.tsx`
- `[...slug]/this-is-not-a-page-but-ends-with-page.tsx`
- `[...slug]/components/the-page.tsx`
You will recieve a error
```
Error: Catch-all must be the last part of the URL.
at UrlNode._insert ({repo-dir}/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js:54:19)
at UrlNode._insert ({repo-dir}/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js:136:40)
at UrlNode.insert ({repo-dir}/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js:8:14)
at {repo-dir}/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js:159:46
at Array.forEach (<anonymous>)
at Object.getSortedRoutes ({repo-dir}/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js:159:21)
at Watchpack.<anonymous> ({repo-dir}/node_modules/next/dist/server/dev/next-dev-server.js:437:55)
```
I suspect there is some check for `page` but not actually checking if file is _only_ named `page`. From what I can tell in the [Special Files](https://beta.nextjs.org/docs/routing/fundamentals#special-files) documentation, _only_ `page.tsx` should be special, and `this-is-not-a-page.tsx` or even `page.client.tsx` should work. | https://github.com/vercel/next.js/issues/42972 | https://github.com/vercel/next.js/pull/42996 | ec07e30985dde685562bd36b41ce977ec11b3834 | fdc07c001218c3eda5037ad30425fa9756201770 | "2022-11-16T01:24:39Z" | javascript | "2022-11-16T21:46:04Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,964 | ["packages/next/build/jest/jest.ts", "test/production/jest/transpile-packages.test.ts"] | [next/jest] ensure packages in experimental.transpilePackages get transformed | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 20.6.0: Mon Aug 29 04:31:06 PDT 2022; root:xnu-7195.141.39~2/RELEASE_X86_64
Binaries:
Node: 16.13.0
npm: 8.16.0
Yarn: 1.22.19
pnpm: 7.14.0
Relevant packages:
next: 13.0.3
eslint-config-next: 12.3.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Packages that are specified in `experimental.transpilePackages` should also be transformed in a jest environment.
### Expected Behavior
I would expect that using a jest config created from `next/jest`, my test code would "just work" the same as my application code without further configuration. In particular, `transformIgnorePatterns` should be updated to align with the `transpilePackages` config.
e.g. if I had this in my next config:
```
{
experimental: {
transpilePackages: ['my-transpiled-package']
}
}
```
`transformIgnorePatterns` would be updated to look like this:
```
transformIgnorePatterns: ['/node_modules/(?!(my-transpiled-package))']
```
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/BRKalow/next-transpile-packages-jest
### To Reproduce
```
yarn test
``` | https://github.com/vercel/next.js/issues/42964 | https://github.com/vercel/next.js/pull/42987 | e6a7d7879e5bfb7c22d70feb2c76410f1c549574 | 71a8c73d5d9e8940552742cbb7a4d58c54b42666 | "2022-11-15T20:30:50Z" | javascript | "2022-11-16T19:55:06Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,932 | ["packages/next/client/components/headers.ts", "packages/next/client/components/navigation.ts", "packages/next/client/components/static-generation-async-storage.ts", "packages/next/client/components/static-generation-bailout.ts", "packages/next/server/app-render.tsx", "test/e2e/app-dir/app-static.test.ts", "test/e2e/app-dir/app-static/app/force-static/[slug]/page.js", "test/e2e/app-dir/app-static/app/force-static/layout.js", "test/e2e/app-dir/app-static/app/force-static/page.js"] | dynamic=`force-static` not working in conjunction with `useSearchParams` | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
$ /Users/cipri/dev/7879/src/my-turborepo/node_modules/.bin/next info
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 16.17.0
npm: 8.15.0
Yarn: 1.22.19
pnpm: 7.13.1
Relevant packages:
next: 13.0.3
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
When forcing a component to render as static but you are using `useSearchParams` the static page won't get generated, it will be siltently converted to a dynamic page without any errors thrown
### Expected Behavior
The docs specify:
> 'force-static': Force static rendering and static data fetching of a layout or page by forcing [cookies()](https://beta.nextjs.org/docs/api-reference/cookies), [headers()](https://beta.nextjs.org/docs/api-reference/headers) and [useSearchParams()](https://beta.nextjs.org/docs/api-reference/use-search-params) to return empty values.
I would expect either an error to be thrown or the docs explanation to be valid and get an empty value from useSearchParams
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/cipriancaba/nextjsrepro
### To Reproduce
Run `yarn build` and see the output where the checkout page is not statically generated. When removing the useSearchParams it works as expected | https://github.com/vercel/next.js/issues/42932 | https://github.com/vercel/next.js/pull/43061 | 37d5abaa94becabcebcc23e3ced4e9b510746f4c | abd5a8436ffe7362548db5e2c8639a715cf9cbf3 | "2022-11-15T08:33:12Z" | javascript | "2022-11-18T17:47:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,921 | ["packages/next/src/server/lib/router-utils/setup-dev-bundler.ts", "test/integration/middleware-src/test/index.test.js", "test/turbopack-tests-manifest.json"] | Middleware does not function in Next.js 13 while using Turbopack | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Wed Mar 2 00:30:59 UTC 2022
Binaries:
Node: 19.0.0
npm: 8.19.2
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.3-canary.4
eslint-config-next: 13.0.3
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Using `next dev --turbo` causes middleware not to execute.
### Expected Behavior
Using `next dev --turbo` should not affect middleware execution.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/scissorhands26/nextjs-13-middleware-turbopack-bug
### To Reproduce
Use middleware in conjunction with the pages or app directory, and add the `--turbo` flag to `"dev": "next dev --turbo"`. | https://github.com/vercel/next.js/issues/42921 | https://github.com/vercel/next.js/pull/58218 | af2c3f71bf6d736000f04188cd3223846c5caae6 | b2c926f7c2686dd630102d8999ffbc41a67a57da | "2022-11-15T02:23:15Z" | javascript | "2023-11-10T13:48:20Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,874 | ["packages/next/build/webpack/plugins/flight-client-entry-plugin.ts", "test/e2e/app-dir/app-alias.test.ts"] | [Appdir] Using app directory inside src directory cause First Load JS shared by all equal 0kb | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
- Operating System:
- Platform: win32
- Arch: x64
- Version: Windows 10 Home Single Language
- Binaries:
- Node: 18.12.1
- npm: N/A
- Yarn: N/A
- pnpm: 7.15.0
- Relevant packages:
- next: 13.0.3
- eslint-config-next: 13.0.3
- react: 18.2.0
- react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Put app directory inside src directory cause First Load JS shared by all equal 0kb on build
### Expected Behavior
First Load JS shared by all not equal 0kb
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://stackblitz.com/edit/vercel-next-js-m3shiy
### To Reproduce
1. Init project with create-next-app with --experimental-app flag
2. Move both pages and app into src directory
3. Run next build | https://github.com/vercel/next.js/issues/42874 | https://github.com/vercel/next.js/pull/43234 | ef7a6e12107c6bf59ec3312d2c2040f169238d82 | 3a770fd1438475b7c08c71de42a8e37451dd4966 | "2022-11-14T07:08:30Z" | javascript | "2022-11-22T14:03:46Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,862 | ["packages/next/src/build/webpack/loaders/next-app-loader.ts", "packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts", "packages/next/src/server/app-render.tsx", "test/e2e/app-dir/app/app/css/css-duplicate-2/client/page.js", "test/e2e/app-dir/app/app/css/css-duplicate-2/layout.js", "test/e2e/app-dir/app/app/css/css-duplicate-2/server/page.js", "test/e2e/app-dir/app/app/css/css-duplicate-2/style.module.css", "test/e2e/app-dir/app/index.test.ts"] | AppDir: component styles get overridden every time new component instances load | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Fri Apr 2 22:23:49 UTC 2021
Binaries:
Node: 18.12.0
npm: 8.19.2
Yarn: 1.22.17
pnpm: N/A
Relevant packages:
next: 13.0.3
eslint-config-next: 13.0.1
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Whenever a new component loads, it overrides any custom styling on that component.
For example lets say I have a Link component that has `color: gray` and I've used it in header but because header is gray itself, I've added a custom styling for that link as `color: white`.
Now imagine I have another page that uses same Link component but with default styles this time (`color: gray`)
Open the app's home page (which does not have any link inside, only in header), everything fine, navigate to the other page that is using Link component, header color breaks because the default style of the Link component loads again and replaces custom color set for header Link
### Expected Behavior
Think it's obvious but just to fill in:
The ideal behavior is not to refetch Link component's styles when it's already loaded
Another bad but still better behavior would be to load it but not override custom styles of Link in header
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
[Reproduction Live (stackblitz) Link](https://stackblitz.com/edit/vercel-next-js-gjdhpw?file=app/head.tsx)

### To Reproduce
Explained enough in **Describe the Bug** section, together with the reproduction link it should be enough to reproduce | https://github.com/vercel/next.js/issues/42862 | https://github.com/vercel/next.js/pull/44938 | b04fc99e6ada9c4fe09165c6a924526057afa57a | 3a9bfe60d228fc2fd8fe65b76d49a0d21df4ecc7 | "2022-11-13T19:57:47Z" | javascript | "2023-01-17T18:36:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,852 | ["package.json", "packages/next-swc/Cargo.lock", "packages/next-swc/crates/core/Cargo.toml", "packages/next-swc/crates/core/tests/loader/issue-30389/output.js", "packages/next-swc/crates/napi/Cargo.toml", "packages/next-swc/crates/wasm/Cargo.toml", "packages/next/package.json", "pnpm-lock.yaml", "test/unit/next-swc.test.ts"] | 13.0.3+13.0.4 production builds cause some external libraries to misbehave | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 18.11.0
npm: 8.19.2
Yarn: 3.2.4
pnpm: N/A
Relevant packages:
next: 13.0.3
eslint-config-next: 13.0.3
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Production builds of next 13.0.3 cause [luxon](https://www.npmjs.com/package/luxon) to break - I suspect the impact is more widespread than just this library hence reporting here.
Development builds work fine.
The specific issue I'm seeing is that `DateTime.now().toISO()` should return an ISO date-time string (e.g `2022-11-13T00:00:00+1:00`). In 13.0.3 I just receive the GMT offset part (e.g. `+1:00`).
Versions <= 13.0.2 are fine; canary is broken.
### Expected Behavior
Production builds should not break applications.
Production builds should not differ in behavior to development builds.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://stackblitz.com/edit/vercel-next-js-ph9din
### To Reproduce
See [reproduction](https://stackblitz.com/edit/vercel-next-js-ph9din?file=pages%2Findex.tsx) for example code.
Create a build (`next build`) and start the server (`next start`) and see that only the timezone offset is displayed. | https://github.com/vercel/next.js/issues/42852 | https://github.com/vercel/next.js/pull/42977 | f4b4c09f94c38c9a4c3936d2ae938ef6f125757e | 3d62f467cf4644e3e087f8db954d0db7156c69ea | "2022-11-13T09:08:33Z" | javascript | "2022-11-20T02:18:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,801 | ["package.json", "packages/next-swc/Cargo.lock", "packages/next-swc/crates/core/Cargo.toml", "packages/next-swc/crates/core/tests/loader/issue-30389/output.js", "packages/next-swc/crates/napi/Cargo.toml", "packages/next-swc/crates/wasm/Cargo.toml", "packages/next/package.json", "pnpm-lock.yaml", "test/unit/next-swc.test.ts"] | SVGs (specifically Lottie file SVG json) not rendering properly in 13.0.3 | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 16.17.1
npm: 8.15.0
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.3
eslint-config-next: 13.0.3
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Firefox
### How are you deploying your application? (if relevant)
Vercel
### Describe the Bug
After upgrading to Next 13.0.3, Lottie files (animated SVG json) are not rendering properly:

Should look like:

### Expected Behavior

Lottie files should rendering SVG properly. Not sure exactly where this regressed in the latest.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://rhythm-marketing-git-package-updates-111122-gotrhythm.vercel.app/
### To Reproduce
Have a site running 13.0.3 that uses Lottie files using `react-lottie-player` | https://github.com/vercel/next.js/issues/42801 | https://github.com/vercel/next.js/pull/42977 | f4b4c09f94c38c9a4c3936d2ae938ef6f125757e | 3d62f467cf4644e3e087f8db954d0db7156c69ea | "2022-11-11T16:56:07Z" | javascript | "2022-11-20T02:18:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,782 | ["packages/next-swc/crates/napi/src/minify.rs"] | Significant bundle size increase after switching to v13.0.3 | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101
Binaries:
Node: 18.12.0
npm: 8.19.2
Yarn: 1.22.19
pnpm: 7.14.2
Relevant packages:
next: 13.0.3
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Starting with `13.0.3-canary.0` (and newer releases) the resulting bundles have a significant increase in size.
For the starter app created using `npx create-next-app@latest nextjs-starter --use-npm --example "https://github.com/vercel/next-learn/tree/master/basics/learn-starter"` the build results are as the following:
**v13.0.2**:
```
Route (pages) Size First Load JS
┌ ○ / 5.05 kB 77.7 kB
└ ○ /404 181 B 72.9 kB
+ First Load JS shared by all 72.7 kB
├ chunks/framework-8c5acb0054140387.js 45.4 kB
├ chunks/main-85616fa12b5fff02.js 26.3 kB
├ chunks/pages/_app-df511a3677d160f6.js 194 B
└ chunks/webpack-ee7e63bc15b31913.js 815 B
○ (Static) automatically rendered as static HTML (uses no initial props)
```
**v13.0.3**:
```
Route (pages) Size First Load JS
┌ ○ / 5.75 kB 84.6 kB
└ ○ /404 212 B 79 kB
+ First Load JS shared by all 78.8 kB
├ chunks/framework-0f397528c01bc177.js 45.7 kB
├ chunks/main-e71c796c4d7cc2e4.js 31.8 kB
├ chunks/pages/_app-ef9da0a6572b3989.js 243 B
└ chunks/webpack-7a6cea4e6a92562f.js 1.08 kB
```
This gives 8-9% increase in the First Load JS, just for the starter app.
For the apps I am working on, upgrade to v13.0.3 gave even larger numbers (20-25%).
### Expected Behavior
No increase in bundles size or the reasoning behind it.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/vercel/next-learn/tree/master/basics/learn-starter
### To Reproduce
Checkout the code and run build using `v13.0.2` and `v13.0.3`. | https://github.com/vercel/next.js/issues/42782 | https://github.com/vercel/next.js/pull/42790 | f5031a48c8cb563702641008136127d90991515e | 5e965bc9c4d1f1ad9240a915dad54e366a5a34e5 | "2022-11-11T10:57:28Z" | javascript | "2022-11-11T14:55:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,765 | ["packages/next/src/client/image.tsx", "packages/next/src/shared/lib/image-blur-svg.ts", "test/integration/next-image-new/default/pages/fill-blur.js", "test/integration/next-image-new/default/test/index.test.ts", "test/integration/next-image-new/default/test/static.test.ts"] | Image blur placeholder not taking full width with fill image | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000
Binaries:
Node: 16.13.2
npm: 8.12.1
Yarn: 1.22.19
pnpm: 7.14.2
Relevant packages:
next: 13.0.2
eslint-config-next: 13.0.2
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome 107.0.5304.87
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
When using the `Image` component (Next.js v13) with `fill` and a `blurDataURL`, the blurred placeholder is not taking the full width of the viewport as the loaded image does.
<table>
<tr>
<th> Blurred placeholder
<th> Loaded image
<tr>
<td> <img width="915" alt="Screenshot 2022-11-10 at 16 11 51" src="https://user-images.githubusercontent.com/5436545/201217445-4b90f92d-e84a-4262-bf60-8ee144f534f3.png">
<td> <img width="913" alt="Screenshot 2022-11-10 at 16 11 58" src="https://user-images.githubusercontent.com/5436545/201217453-96b24130-6223-459d-821a-73e59dd8993b.png">
</table>
I stumbled across [this PR](https://github.com/vercel/next.js/pull/41573) which fixed some bugs related to the blur placeholder. It seems that adding `preserveAspectRatio="none"` to the generated SVG without width / height would fix the issue but I don't know the implications.
Also, why is it an SVG and not just the `base64` image as it was on Next.js v12?
### Expected Behavior
The blurred SVG should take the full width of the viewport and not display empty spaces around the image. It was working correctly on Next.js v12.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://codesandbox.io/s/goofy-orla-v8kciw
### To Reproduce
Use an `Image` component with `fill` and a `blurDataURL`. | https://github.com/vercel/next.js/issues/42765 | https://github.com/vercel/next.js/pull/44317 | b294073d0fa94f5a91c6d8f29907018ff26e2e65 | bf7fea5b8080cd9164ea7db70181c76d4164cb7b | "2022-11-10T22:26:50Z" | javascript | "2023-02-02T22:04:03Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,751 | ["packages/next/build/index.ts", "packages/next/build/utils.ts", "test/e2e/og-api/index.test.ts"] | Edge Chunks are not copied over from original .next/server to .next in .next/standalone/server | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro for Workstations
Binaries:
Node: 18.12.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.3-canary.3
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome 107.0.5304.89 / Firefox Developer Edition 107.0b9
### How are you deploying your application? (if relevant)
Fly.io (https://reproduction-next-standalone-edge-chunks.fly.dev/ //removed because of the 2-app limit set by Fly.io)
### Describe the Bug
When I used `output: "standalone"` in next.config.js and deployed it on Fly.io using Dockerfile (same as the one in examples/with-docker) and then went to /api/hello, instead of seeing the expected og image generated with vercel/og, I saw an error like this "Internal Server Error". When I checked Fly.io's log it turned out that there's no such file as '.next/server/edge-chunks/wasm_5b50c798761dc0131e9ebe945031077e8a02633b.wasm'.

So I tried building the app locally it turned out that there exists files with the name 'wasm_*long hash*.wasm' in the root .next's ./server/edge-chunks, but that edge-chunks folder wasn't copied into the .next/server folder in .next/standalone.
Oh, and upon building it locally, I also saw this

I don't know if it may be related to the issue, so here it is.
Thank you :)
### Expected Behavior
Everything should works normally as if in `next dev` or production without standalone mode.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/DuCanhGH/no-edge-chunks-in-next-standalone
### To Reproduce
To reproduce you have to:
- Deploy the repository on somewhere that supports Dockerfile, or:
- Clone the repository.
- Run `pnpm i`.
- Run `pnpm build`.
- Run `node .next/standalone/server.js`, if this doesn't work then you may have to use Docker to build an image and start it (this is the case for me on Windows).
- Go to /api/hello. | https://github.com/vercel/next.js/issues/42751 | https://github.com/vercel/next.js/pull/43326 | 77738edea8ace901e9f5e0ff12dcf9ea3756d85c | f6106d20fb2cf5a3e634111a2b1b9cc00f188daa | "2022-11-10T14:15:15Z" | javascript | "2022-12-01T03:35:59Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,729 | ["docs/getting-started.md", "docs/upgrading.md", "package.json", "packages/create-next-app/package.json", "packages/next/package.json", "packages/next/taskfile-swc.js"] | Docs: upgrade minumum Node.js version in the docs | ### What is the improvement or update you wish to see?
Currently the minimum version of Node.js is specified in the docs as 14.0.0 or 14.6.0:
- [Upgrade Guide](https://nextjs.org/docs/upgrading)
The minimum Node.js version has been bumped from 12.22.0 to **14.0.0**, since 12.x has reached end-of-life.
- [System Requirements](https://nextjs.org/docs#system-requirements)
[Node.js **14.6.0**](https://nodejs.org/) or newer
I've been using Node.js v14.17.6 and I've run into the issue with middleware which is described in the section below.
I've spent some time trying to resolve the issue. After that I've checked the specified minimum Node.js versions and my Node.js was above the minimum so I didn't think it was a problem with Node.
After some more digging I've upgraded Node.js to v14.18.0 and it worked.
I think it would be good to specify the actual required minimum version in the docs that works with Next.js 13
### Is there any context that might help us understand?
The issue is present on the Node.js **v14.17.6 and below**, including the minimum **v14.6.0**. Checked on Next.js 13.0.2 and 13.0.3-canary.3
It seems to work fine on the Node.js **v14.18.0** and above.
Steps to reproduce:
- Create a Next.js project from the standard template `yarn create next-app`
- Add `middleware.ts` file with the simple middleware:
```
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
export const middleware = async (req: NextRequest) => {
console.log('Got request in the middleware');
return NextResponse.next();
};
export const config = {
matcher: '/api/:path*',
};
```
- Start the app using `yarn dev`
- Try to access the api route `http://localhost:3000/api/hello`
After that there's a following error:
```
Error [TypeError]: Class extends value undefined is not a constructor or null
at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/file.js (evalmachine.<anonymous>:5724:19)
at __require (evalmachine.<anonymous>:14:50)
at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/formdata.js (evalmachine.<anonymous>:5881:49)
at __require (evalmachine.<anonymous>:14:50)
at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/body.js (evalmachine.<anonymous>:6094:35)
at __require (evalmachine.<anonymous>:14:50)
at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/response.js (evalmachine.<anonymous>:6510:49)
at __require (evalmachine.<anonymous>:14:50)
at <unknown> (evalmachine.<anonymous>:11635:30)
at requireFn (file://R:\work\_tmp\video-api-tiktok\node_modules\next\dist\compiled\edge-runtime\index.js:1:7079) {
middleware: true
}
```
Error disappears after upgrading the Node.js to **v14.18.0**
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs | https://github.com/vercel/next.js/issues/42729 | https://github.com/vercel/next.js/pull/48545 | 7f2a4ac1d2a1b1f00f2a619fa91f6b3448f49556 | 7b6e336bc58790f1006cd00adcd5a27988e6d62b | "2022-11-10T08:07:30Z" | javascript | "2023-04-19T15:16:37Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,715 | ["errors/app-dir-dynamic-href.md", "errors/manifest.json", "packages/next/client/link.tsx", "test/e2e/app-dir/dynamic-href.test.ts", "test/e2e/app-dir/dynamic-href/app/layout.js", "test/e2e/app-dir/dynamic-href/app/object/[slug]/page.js", "test/e2e/app-dir/dynamic-href/app/object/page.js", "test/e2e/app-dir/dynamic-href/app/string/page.js", "test/e2e/app-dir/dynamic-href/next.config.js"] | `next/link` does not format the URL string properly with URL object for a dynamic route. | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 18.12.1
npm: 9.1.1
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.3-canary.2
eslint-config-next: 13.0.2
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome 107.0.5304.87 (Official Build) (arm64)
### How are you deploying your application? (if relevant)
`next dev` and `next start`
### Describe the Bug
Based on NextJS beta and stable docs:
- https://beta.nextjs.org/docs/api-reference/components/link#href
- https://nextjs.org/docs/api-reference/next/link#with-url-object
A URL object can be used inside `Link` in the following way.
```
<Link
href={{
pathname: '/blog/[slug]',
query: { slug: 'my-post' },
}}
>
```
Which will generate a link to `/blog/my-post`.
However, it instead generates a link to `/blog/[slug]?slug=my-post`.
### Expected Behavior
`Link` should generate a link to `/blog/my-post`.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://stackblitz.com/edit/vercel-next-js-s8tr8n?file=app/page.tsx
### To Reproduce
1. Create a new app with `npx create-next-app@latest --experimental-app`.
2. Add the following code to `app/page.tsx`.
```
<Link href={{ pathname: "/blog/[slug]", query: { slug: "my-post" } }}>
Hyperlink
</Link>
```
3. Create `app/blog/[slug]/page.tsx` and add the following code to it.
```
export default function Page({ params }: { params: { slug: string } }) {
const { slug } = params;
return (
<div>
<h1>{slug}</h1>
</div>
);
}
```
4. Run the server and visit the 'Hyperlink` from the main page and check out the URL. | https://github.com/vercel/next.js/issues/42715 | https://github.com/vercel/next.js/pull/43074 | c16d4be4c64730916058b88e2030a19a97da7fb0 | 0f195f0270c0be1099bca5a8bbf870b5194d6b08 | "2022-11-10T01:24:24Z" | javascript | "2022-11-25T14:03:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,697 | ["packages/next/client/components/app-router.tsx", "packages/next/client/components/reducer.ts", "test/e2e/app-dir/app-static.test.ts"] | Query params getting stripped from index route (Next 13 - App dir) | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 18.4.0
npm: 8.12.1
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.2
eslint-config-next: 13.0.2
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
Chrome
### How are you deploying your application? (if relevant)
Vercel
### Describe the Bug
When navigating to my website (example -> https://boilerplate-sandy.vercel.app/?utm_source=test) the url params are stripped from the url. This only happens on the root page and not on any nested routes.
I need the `utm_source` for campaign tracking, so would really appreciate some help!
### Expected Behavior
I'd expect the url params to stay in the url when visiting the page. Note that this is the behaviour on Next 12 apps.
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
npx create-next-app@latest --experimental-app
### To Reproduce
This behaviour can be replicated by building a new Next 13 app with `npx create-next-app@latest --experimental-app` | https://github.com/vercel/next.js/issues/42697 | https://github.com/vercel/next.js/pull/42744 | 276533d03e6d72a1ce7bb37f91d6f4d36b7f20a3 | 9d30e777ca10725e345e263c37bf3c3cc082e4fb | "2022-11-09T17:07:27Z" | javascript | "2022-11-10T17:24:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,604 | ["packages/eslint-plugin-next/src/utils/node-attributes.ts", "test/unit/eslint-plugin-next/google-font-display.test.ts"] | @next/next/google-font-display ESLint: Cannot read properties of undefined (reading 'value') | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Sat Oct 29 14:21:50 UTC 2022
Binaries:
Node: 19.0.0
npm: 8.19.2
Yarn: 1.22.19
pnpm: 7.14.1
Relevant packages:
next: 13.0.3-canary.0
eslint-config-next: 13.0.3-canary.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
When running `next build` the following error is logged:
`info - Linting and checking validity of types ...error - ESLint: Cannot read properties of undefined (reading 'value') Occurred while linting /home/adjsky/Programming/stuff/evil-cards/apps/client/src/pages/_document.tsx:8 Rule: "@next/next/google-font-display"`
the line that fails check:
```jsx
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
```
when specifying crossOrigin="anonymous" check doesn't fail
### Expected Behavior
check doesn't fail
### Link to reproduction
https://github.com/adjsky/next-eslint-google-font-display
### To Reproduce
1. clone reproduction repo
2. install deps
3. run `next build` | https://github.com/vercel/next.js/issues/42604 | https://github.com/vercel/next.js/pull/42625 | eed63e1edc70b2ecbee5f6b8941f74378d9be75a | 2b85da7735a12f8b7c46de2b45b714607d67c134 | "2022-11-07T22:45:00Z" | javascript | "2022-11-10T03:54:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,587 | ["packages/next/server/app-render.tsx", "test/e2e/app-dir/async-component-preload.test.ts", "test/e2e/app-dir/async-component-preload/app/layout.js", "test/e2e/app-dir/async-component-preload/app/page.js", "test/e2e/app-dir/async-component-preload/app/success/page.js", "test/e2e/app-dir/async-component-preload/next.config.js"] | Error: NEXT_REDIRECT crashing server in prod | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 16.15.1
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.3-canary.0
eslint-config-next: 13.0.2
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome Version 107.0.5304.88
### How are you deploying your application? (if relevant)
Vercel and localhost in prod environment
### Describe the Bug
Looks similar to #42556, but this issue is based on the server crashing
Whenever I run `yarn build && yarn start` and visit `http://localhost:3000/dashboard` i receive this error:

The route `/dashboard` is set to route a user back to `/` if not logged in. This is done in a SC via the `redirect()` function.
This error crashes the server and I have to restart it, on a vercel deployment I just get a 500 error.
### Expected Behavior
I expect the page to redirect the user to the desired URL without the server crashing.
### Link to reproduction
https://github.com/OMikkel/next_redirect_repro
### To Reproduce
1. Clone git repo above
2. Run yarn install
3. Run yarn build
4. Run yarn start
5. Go to /dashboard
6. Restart the app
7. Try again | https://github.com/vercel/next.js/issues/42587 | https://github.com/vercel/next.js/pull/42793 | 0f8b3d6c8b9a996d812245e6a901940b916444d5 | a0e51781e81ec51bd86623e623041eaa3947366a | "2022-11-07T15:09:00Z" | javascript | "2022-11-15T13:46:55Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,532 | ["packages/next/server/dev/next-dev-server.ts", "test/e2e/app-dir/app/app/dynamic-pages-route-app-overlap/app-dir/page.js", "test/e2e/app-dir/app/pages/dynamic-pages-route-app-overlap.js", "test/e2e/app-dir/app/pages/dynamic-pages-route-app-overlap/[slug].js", "test/e2e/app-dir/index.test.ts"] | [...catchall] takes precedence when navigating from /pages to /app | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Running in Codesandbox, cannot run `next info`
"dependencies": {
"next": "13.0.3-canary.0",
"react": "18.3.0-next-4bd245e9e-20221104",
"react-dom": "18.3.0-next-4bd245e9e-20221104"
},
### What browser are you using? (if relevant)
Chrome Version 107.0.5304.88 (Official Build) (64-bit)
### How are you deploying your application? (if relevant)
Vercel
### Describe the Bug
When navigating from a page in the legacy /pages directory to the new /app directory, a [...catchall] in /pages will take be resolved instead.
### Expected Behavior
Navigating from /pages to /app should go to the correct page in /app.
### Link to reproduction
https://codesandbox.io/s/catchall-bug-k7x8pi?file=/pages/%5B...catchall%5D.tsx
### To Reproduce
Create a NextJS 13 application that uses both the legacy /pages directory and the new /app directory.
Create links that navigate between them.
Add a top level [...catchall] in the /pages directory.
Deploy to Vercel.
**This bug does not happen in dev.** I have yet to confirm if this happens on all `next build && next start` builds, or if only when deployed to Vercel.
Notice how when navigating between a page originating in /pages towards one in /app, instead the catchall page is hit.
Navigation between /pages to /pages, /app to /app or /app to /pages works as expected.
https://csb-k7x8pi-gweyxi0yg-winwardo.vercel.app/ | https://github.com/vercel/next.js/issues/42532 | https://github.com/vercel/next.js/pull/43188 | ee969ea8fc15105839393692e480786ab596646e | d8d9b2c985d576500821508b92c6e18a50be5df7 | "2022-11-06T10:23:27Z" | javascript | "2022-11-21T23:52:12Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,519 | ["packages/next/build/webpack/plugins/flight-manifest-plugin.ts"] | Adding any script to root layout (or layout or page) causing an error in clean next 13 repo | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Home
Binaries:
Node: 16.13.1
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.1
eslint-config-next: 13.0.1
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome 106.0.5249.119
### How are you deploying your application? (if relevant)
next dev -p 5000
### Describe the Bug
Tried adding google analytics tag script to root layout file as follows:
```
import { Providers } from "./providers";
import localFont from "@next/font/local";
import Script from "next/script";
const Archivo = localFont({
src: "./fonts/Archivo-Regular.ttf",
weight: "400",
});
export default function RootLayout({ children }) {
return (
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body style={{ margin: 0, padding: 0 }}>
<Providers>
<section
style={{
backgroundColor: "red",
height: "50px",
}}
className={Archivo.className}
>
The is the App Top Header - Will Apear in all pages
</section>
<section>{children}</section>
</Providers>
</body>
<Script
strategy="lazyOnload"
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS}`}
/>
<Script strategy="lazyOnload">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS}', {
page_path: window.location.pathname,
});
`}
</Script>
</html>
);
}
```
but gets the following error as soon as the page gets hydrated
```
Unhandled Runtime Error
ChunkLoadError: Loading chunk amp failed.
(missing: http://localhost:5000/_next/static/chunks/amp.js)
Call Stack
__webpack_require__.f.j
file:///C:/Users/sanit/Desktop/next13/.next/static/chunks/webpack.js (875:29)
<unknown>
/_next/static/chunks/webpack.js (155:40)
Array.reduce
<anonymous>
__webpack_require__.e
file:///C:/Users/sanit/Desktop/next13/.next/static/chunks/webpack.js (154:67)
fn.e
/_next/static/chunks/webpack.js (397:50)
self.__next_chunk_load__
node_modules\next\dist\client\app-index.js (31:33)
preloadModule
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (83:0)
resolveModule
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (650:0)
processFullRow
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (735:0)
processBinaryChunk
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (789:0)
```
also in the console i see
```
amp-dev.js?5ccf:7 Uncaught TypeError: Cannot read properties of null (reading 'textContent')
at eval (amp-dev.js?5ccf:7:49)
at ./node_modules/next/dist/client/dev/amp-dev.js (amp.js:106:1)
at options.factory (webpack.js:722:31)
at __webpack_require__ (webpack.js:37:33)
at __webpack_exec__ (amp.js:703:61)
at amp.js:704:37
at webpackJsonpCallback (webpack.js:1410:39)
at amp.js:9:61
```
i noticed that when i run the project with next build and then next start i only get the console warning
### Expected Behavior
The page should load normally and the script called.
### Link to reproduction
https://github.com/madaher-dev/next13.git
### To Reproduce
Follow docs to install clean next 13 project
create app directory and page and root layout
import next/script to root layout
use any script in the root template html | https://github.com/vercel/next.js/issues/42519 | https://github.com/vercel/next.js/pull/43334 | e650047d4b79d130292e75e89f43d127a2d8b4e2 | e8fd18a5056df3d19103e5c22b6784f888235632 | "2022-11-05T20:29:43Z" | javascript | "2022-11-25T08:36:26Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,517 | ["packages/next/build/utils.ts"] | Typo | ### 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 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64
Binaries:
Node: 16.18.1
npm: 8.19.2
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.3-canary.0
eslint-config-next: 13.0.2
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Should say `generateStaticParams` instead of saying `getStaticPaths`.
<img width="770" alt="image" src="https://user-images.githubusercontent.com/26862106/200135762-f1348a73-14a2-4205-ade5-24924bc68908.png">
### Expected Behavior
x
### Link to reproduction
x
### To Reproduce
use next version mentioned,
use app dir instead of pages | https://github.com/vercel/next.js/issues/42517 | https://github.com/vercel/next.js/pull/42524 | 27159d07e37cf257bb31e65343d1b504ef49cded | 257835569cd0580d0f9f8391af45c411eb9a898a | "2022-11-05T18:41:08Z" | javascript | "2022-11-06T06:02:24Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,514 | ["packages/next/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts", "packages/next/server/dev/next-dev-server.ts"] | Bug: extremely high memory usage with `next dev` | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: android
Arch: arm64
Version: #2 SMP PREEMPT Fri Aug 5 15:52:33 AST 2022
Binaries:
Node: 18.10.0
npm: 8.19.2
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.3-canary.0
eslint-config-next: 13.0.2
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome Canary v109.0.5400.0 (Android)
### How are you deploying your application? (if relevant)
Vercel
### Describe the Bug
The memory usage on the last next 13 (13.0.3-canary.0 and 13.0.2) releases are too high. `next dev` command uses about 1gb of ram. Next 12 is using about 300mb-500mb's of ram.

### Expected Behavior
`next dev` should use less ram.
### Link to reproduction
.
### To Reproduce
1. Create project with Next 13
2. Run `next dev`
3. Check the ram usage | https://github.com/vercel/next.js/issues/42514 | https://github.com/vercel/next.js/pull/43859 | 8a171986adf170639e62ab0851191187d187a0fb | 589f090d0bdd6c6b0c1e1bcd8de7507037d4322e | "2022-11-05T15:13:20Z" | javascript | "2022-12-08T19:50:46Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,513 | ["packages/next/server/dev/next-dev-server.ts", "test/e2e/app-dir/app/app/dynamic-pages-route-app-overlap/app-dir/page.js", "test/e2e/app-dir/app/pages/dynamic-pages-route-app-overlap.js", "test/e2e/app-dir/app/pages/dynamic-pages-route-app-overlap/[slug].js", "test/e2e/app-dir/index.test.ts"] | next/link from pages to appDir url results in 404 | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000
Binaries:
Node: 18.7.0
npm: 8.15.0
Yarn: 1.22.19
pnpm: 6.34.0
Relevant packages:
next: 13.0.3-canary.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
next build; next start
### Describe the Bug
I have a link from a page (old stye) which uses `next/link` and it points to a page defined using app dir. When I click the link in dev mode it works fine, but when I click the link using `next build; next start` I get a 404 page. Loading the URL via a link from within the app dir pages (using `next/navigation`'s Link) works fine. Loading the URL directly (no client-side navigation) also works.
### Expected Behavior
Clicking the link in the legacy part of my app opens the new page.
`8ff964e89c6b34adc60b63be91a3570197c26d0e`
### Link to reproduction
https://github.com/captbaritone/jordaneldredge.com/
### To Reproduce
Check out the repo, checkout hash `8ff964e89c6b34adc60b63be91a3570197c26d0e`.
```
yarn
yarn build
yarn start
```
Click "Notes" in the nav bar.
## Expected
Notes page loads
## Actual
404 page renders | https://github.com/vercel/next.js/issues/42513 | https://github.com/vercel/next.js/pull/43188 | ee969ea8fc15105839393692e480786ab596646e | d8d9b2c985d576500821508b92c6e18a50be5df7 | "2022-11-05T03:54:22Z" | javascript | "2022-11-21T23:52:12Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,504 | ["packages/next/server/base-server.ts"] | content-type sometimes octet-stream instead of tex/html causing browser to prompt to download the site | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101
Binaries:
Node: 16.16.0
npm: 8.11.0
Yarn: 1.22.15
pnpm: 7.9.0
Relevant packages:
next: 13.0.2-canary.3
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
warn - Latest canary version not detected, detected: "13.0.2-canary.3", newest: "13.0.2".
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
```
The version is `^13.0.2-canary.3` in `package.json` but it still complains.
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
Vercel
### Describe the Bug
content-type on the html files is sometimes incorrectly octet-stream instead of text/html. This causes the browser to prompt to download the site.
<div style="display: flex; flex-direction: row;">
<img width="356" alt="image" src="https://user-images.githubusercontent.com/14835120/200079807-26c0c6c7-c7d9-413b-911f-5717453a41d0.png">
<img width="346" alt="image" src="https://user-images.githubusercontent.com/14835120/200080414-84549830-a26f-4092-80c3-1cf34d56a400.png">
</div>

### Expected Behavior
The site loads every time.
### Link to reproduction
https://github.com/alvarlagerlof/portfolio
### To Reproduce
https://portfolio-git-test-canary-lagerlof.vercel.app (13.0.2-canary.3)
Reload a few times and it will show up either every time for a while or after a few times. | https://github.com/vercel/next.js/issues/42504 | https://github.com/vercel/next.js/pull/42508 | 00e416bf7c190da277f40d1d87f951a4fae4df57 | 192dc6bad6603d54851c282b2b8291a76afa54a0 | "2022-11-04T21:47:57Z" | javascript | "2022-11-04T23:37:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,492 | ["packages/next/src/client/components/layout-router.tsx", "packages/next/src/server/app-render.tsx", "test/e2e/app-dir/autoscroll-with-css-modules/app/[num]/page.tsx", "test/e2e/app-dir/autoscroll-with-css-modules/app/[num]/styles.module.css", "test/e2e/app-dir/autoscroll-with-css-modules/app/layout.tsx", "test/e2e/app-dir/autoscroll-with-css-modules/index.test.ts", "test/e2e/app-dir/autoscroll-with-css-modules/next.config.js", "test/e2e/app-dir/next-font/next-font.test.ts", "test/e2e/app-dir/router-autoscroll/router-autoscroll.test.ts"] | [NEXT-378] Next 13: Navigation with Link does not scroll up the page | ### Verify canary release
* [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
**Operating System**:
Platform: linux
Arch: x64
Version: #1 SMP Mon Sep 19 19:14:52 UTC 2022
**Binaries**:
Node: 16.15.0
npm: 8.5.5
Yarn: 3.2.4
pnpm: N/A
**Relevant packages**:
next: 13.0.2
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome 107.0.5304.87
### How are you deploying your application? (if relevant)
Vercel
### Describe the Bug
When navigating between pages using `Link`, the page does not scroll up by default wich is supposed to be the default behaviour of `next/link`
### Expected Behavior
The page scrolls up when switching pages unless I manually disable this feature of `next/link`
### Link to reproduction
[https://beta.otpfy.com/](https://beta.otpfy.com/)
### To Reproduce
* Access [https://beta.otpfy.com/](https://beta.otpfy.com/)
* Scroll down until you see the "Get started for free" button
* Click the given button
* Check that when navigating to the `auth` page the scroll is preserved and not scrolled to the top
\:
<sub>From [SyncLinear.com](https://synclinear.com) | [NEXT-378](https://linear.app/vercel/issue/NEXT-378/next-13-navigation-with-link-does-not-scroll-up-the-page)</sub> | https://github.com/vercel/next.js/issues/42492 | https://github.com/vercel/next.js/pull/45487 | fea8c8e13a40967e927ce28c4e492b2736e22bce | 3827d8fbfb0db4cf69ffae7559804b09b7155730 | "2022-11-04T15:45:28Z" | javascript | "2023-02-07T12:03:18Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,448 | ["packages/eslint-plugin-next/src/rules/no-html-link-for-pages.ts", "test/unit/eslint-plugin-next/no-html-link-for-pages.test.ts", "test/unit/eslint-plugin-next/with-app-dir/app/index.jsx", "test/unit/eslint-plugin-next/with-custom-pages-dir/custom-pages/[profile]/index.tsx", "test/unit/eslint-plugin-next/with-custom-pages-dir/custom-pages/index.jsx", "test/unit/eslint-plugin-next/with-custom-pages-dir/custom-pages/list/[foo]/[id].jsx", "test/unit/eslint-plugin-next/without-pages-dir/index.jsx"] | False positive `no-html-link-for-pages` ESLint rule triggered | I got an eslint error (no-html-link-for-pages):
```
Pages directory cannot be found at ~/Projects/HypeProxy.io/v3/application/pages or ~/Projects/HypeProxy.io/v3/application/src/pages. If using a custom path, please configure with the `no-html-link-for-pages` rule in your eslint config file.
```
_Originally posted by @thisisclint21 in https://github.com/vercel/next.js/discussions/41745#discussioncomment-4046328_
Reproduction:
```
git clone https://github.com/balazsorban44/nextjs-42448
```
```
pnpm i && pnpm lint
```
Note: After the first run, the result is saved in `.next/cache/eslint` and won't show the message again. To reproduce again, remove the `.next/cache/eslint` folder. | https://github.com/vercel/next.js/issues/42448 | https://github.com/vercel/next.js/pull/42516 | 2e144330d9048879389dac375d7c20021553b603 | 054f786c8c59662c8e0e78e3c1af00a6e7a071fe | "2022-11-03T21:59:11Z" | javascript | "2023-03-22T02:15:52Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,441 | ["packages/next/server/config.ts"] | warn - `enableUndici` option is unnecessary in Node.js v18.0.0 or greater. | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 18.12.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.2-canary.2
eslint-config-next: 13.0.1
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
When running npm run dev I get:
warn - `enableUndici` option is unnecessary in Node.js v18.0.0 or greater.
My next.config.js:
```
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true,
},
};
module.exports = nextConfig;
```
### Expected Behavior
Not to see this error message. I do not have this option in my config.
### Link to reproduction
n/a
### To Reproduce

| https://github.com/vercel/next.js/issues/42441 | https://github.com/vercel/next.js/pull/42444 | 0eed10760da90dad999f509fcfb5d56b2a3008e9 | c0a8c881600d11c63e90c660a8dba7131d7a6611 | "2022-11-03T20:37:38Z" | javascript | "2022-11-03T21:30:57Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,419 | ["packages/next/src/lib/typescript/writeVscodeConfigurations.ts"] | [Next 13] Enabling app directory breaks VSCode when using Yarn Berry | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.2.0: Sun Oct 16 18:11:19 PDT 2022; root:xnu-8792.60.32.0.1~11/RELEASE_ARM64_T8112
Binaries:
Node: 18.10.0
npm: 8.19.2
Yarn: 3.2.4
pnpm: N/A
Relevant packages:
next: 13.0.2-canary.2
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
After installing Next 13 + running `next dev`, the VSCode settings.json are automatically updated. However, this auto-update does not recognize Yarn Berry Zero-Installs, which removes the concept of a `node_modules` folder).
The setting is changed from `"typescript.tsdk": ".yarn/sdks/typescript/lib"` to `"typescript.tsdk": "./node_modules/typescript/lib"`.
### Expected Behavior
The setting should not be changed, or it should only selectively change if zero-installs are not enabled.
### Link to reproduction
https://github.com/cravend/yarn-berry-next-13-reproduction
### To Reproduce
- clone above repo
- run `yarn` to link dependencies
- run `yarn dev`
- see the statement "info - VS Code settings.json has been updated for Next.js' automatic app types, this file can be added to .gitignore if desired"
- to revert to old behavior, change the `./.vscode/settings.json` back to `"typescript.tsdk": ".yarn/sdks/typescript/lib"` | https://github.com/vercel/next.js/issues/42419 | https://github.com/vercel/next.js/pull/45311 | eedceaf42ce915762e3d34d0a613d233496a786b | 0d7f7653e81a4f2aa16be7ead286e09b22761f52 | "2022-11-03T16:10:34Z" | javascript | "2023-02-03T20:13:57Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,409 | ["packages/next/client/router.ts"] | Breaking type change on `useRouter()` in v13.0.2-canary.0 | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103
Binaries:
Node: 16.18.0
npm: 8.19.2
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.2-canary.2
eslint-config-next: 13.0.2-canary.2
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
A breaking change seems to be introduced in #41767 now that `useRouter` returns `NextRouter | null` instead of `NextRouter` by default. Calling `router.pathname` or `router.events`, for instance, throws a `Type error: Object is possibly 'null'` error.
Switching instances of `useRouter()` to `useRouter(true)` was an easy enough fix, but I expect lots more people will be hitting this speed bump when this change is released.
### Expected Behavior
Is there a smart way to make this a non-breaking change? If this behavior is expected to be breaking, feel free to close this (but I'd still suggest emphasizing this change in the release notes to avoid a flood of bug reports! 😉)
### Link to reproduction
https://github.com/vercel/examples/pull/443#pullrequestreview-1165317989
### To Reproduce
Update from 13.0.1 to 13.0.2-canary.0 and up.
To fix with minimal changes, replace instances of `useRouter()` with `useRouter(true)`.
Related: https://github.com/vercel/examples/pull/443 | https://github.com/vercel/next.js/issues/42409 | https://github.com/vercel/next.js/pull/42430 | 8fa78a5e3cf9a70d0d9079bbae3a6d5ef5936573 | 152f51c6bd3b3274de431f4e76307e638913b50f | "2022-11-03T13:36:06Z" | javascript | "2022-11-03T18:54:54Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,398 | ["packages/next/server/app-render.tsx", "test/production/app-dir-prefetch-non-iso-url/app/[slug]/page.js", "test/production/app-dir-prefetch-non-iso-url/app/layout.js", "test/production/app-dir-prefetch-non-iso-url/app/page.js", "test/production/app-dir-prefetch-non-iso-url/index.test.ts", "test/production/app-dir-prefetch-non-iso-url/next.config.js"] | Next 13 [Fetching non-iso urls] | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 16.17.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.2-canary.2
eslint-config-next: 13.0.1
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
106.0.5249.119 (Official Build) (64-bit) (cohort: Stable)
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
I think this error is related to the new Router, when prefetching links with Arabic/Persian.
`PREFETCH ERROR TypeError: Failed to execute 'fetch' on 'Window': Failed to read the 'headers' property from 'RequestInit': String contains non ISO-8859-1 code point.`
### Expected Behavior
It should work like in Next 12.
### Link to reproduction
https://github.com/asimMoh/non-iso
### To Reproduce
add some links with non-iso url
`<Link href="/مرحبا">Non ISO</Link>`
`<Link href="ecodeURIComponent('/مرحبا')">Non ISO</Link>` | https://github.com/vercel/next.js/issues/42398 | https://github.com/vercel/next.js/pull/42823 | 22b16e1e37f253236c8508bb68280b2ce2c5ca37 | 4d2b7e573a4aa4ea3d4ef46c8679f1e730791797 | "2022-11-03T08:36:55Z" | javascript | "2022-11-18T01:45:39Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,213 | ["packages/next/src/lib/typescript/writeVscodeConfigurations.ts", "packages/next/src/lib/verifyTypeScriptSetup.ts"] | .vscode folder being added | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Home
Binaries:
Node: 19.0.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.1-canary.2
eslint-config-next: 13.0.1-canary.2
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
.vscode folder and files being added whenever running the server. I'm not using vscode, so this shouldn't apply, is there a reason this needs to be added?
### Expected Behavior
Don't generate a .vscode folder
### Link to reproduction
https://codesandbox.io/s/next-vscode-settings-generation-bug-c9ouvj?file=/package.json
### To Reproduce
[https://github.com/vercel/next.js/pull/42169 removed](https://github.com/vercel/next.js/issues/41966) related issue, the .gitignore was fixed but vscode was not. | https://github.com/vercel/next.js/issues/42213 | https://github.com/vercel/next.js/pull/49133 | c09b0a0890b6562c800b3cf7e2c75e6fb14c240c | cfd27e96a47d121df74f3e84da2923b82914feaf | "2022-10-31T06:12:39Z" | javascript | "2023-05-03T10:15:59Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,171 | ["packages/next-swc/Cargo.lock", "packages/next-swc/crates/core/Cargo.toml", "packages/next-swc/crates/core/tests/full.rs", "packages/next-swc/crates/core/tests/telemetry.rs", "packages/next-swc/crates/napi/Cargo.toml", "packages/next-swc/crates/napi/src/minify.rs", "packages/next-swc/crates/napi/src/transform.rs", "packages/next-swc/crates/wasm/Cargo.toml", "packages/next-swc/crates/wasm/src/lib.rs", "test/unit/next-swc.test.ts"] | Next.js 13 stuck at `Creating an optimized production build...` when building with `swcMinify` | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```text
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 18.12.0
npm: 8.19.2
Yarn: 1.22.19
pnpm: 7.14.1
Relevant packages:
next: 13.0.0 (13.0.1-canary.1)
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
Chrome 107.0.5304.88
### How are you deploying your application? (if relevant)
Vercel
### Describe the Bug
Running `next build` will freeze at `Creating an optimized production build...` but will build successfully after disable the SWC Minifier in `next.config.js`.
Similar with issue https://github.com/vercel/next.js/issues/37825 but, the build will always be stuck whether the development server is running or not.
Refer to https://github.com/nextui-org/nextui/issues/848
### Expected Behavior
Build successfully when using SWC Minifier.
### Link to reproduction
https://codesandbox.io/s/quizzical-tess-nnw9js
### To Reproduce
#### CodeSandbox
1. Fork and add a new [terminal](https://codesandbox.io/docs/learn/repositories/terminal) then run `yarn build`
#### Locally
1. Export the CodeSandbox project
2. `pnpm install && pnpm build`
<details>
<summary>How to export the project from the CodeSandbox to local?</summary>

</details>
| https://github.com/vercel/next.js/issues/42171 | https://github.com/vercel/next.js/pull/42326 | 00df9f3533ce57e138639291e041747d6b8b9c16 | 670f2a8a6d2e96cd488c72842e535c41d3dd7b50 | "2022-10-30T09:31:12Z" | javascript | "2022-11-04T01:37:36Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,157 | ["packages/next/src/client/components/app-router.tsx", "test/e2e/app-dir/navigation/app/hash/page.js", "test/e2e/app-dir/navigation/app/nested-relative-query-and-hash/client-component.js", "test/e2e/app-dir/navigation/app/nested-relative-query-and-hash/page.js", "test/e2e/app-dir/navigation/navigation.test.ts"] | Link with hash doesn't seem to work in next13 | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000
Binaries:
Node: 14.17.5
npm: 6.14.14
Yarn: 1.22.17
pnpm: N/A
Relevant packages:
next: 13.0.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Brave 106.0.5249.119
### How are you deploying your application? (if relevant)
next dev
### Describe the Bug
Linking with hash doesn't seem to work in next13
```
<Link href="#footer">
Link To Footer
</Link>
```
becomes `http://localhost:3000/undefined#footer`
### Expected Behavior
link should be to current page header but instead becomes `http://localhost:3000/undefined#footer`
### Link to reproduction
https://codesandbox.io/p/github/shanejonas/nextjs-link-undefined-bug/draft/great-lake?file=%2Fapp%2Fpage.tsx
### To Reproduce
click/hover over `Link To Footer` to see the link has `undefined` in it
### Screenshot
<img width="1256" alt="image" src="https://user-images.githubusercontent.com/364566/198849912-21933595-afb8-4eeb-b70e-e85a14dda01f.png">
| https://github.com/vercel/next.js/issues/42157 | https://github.com/vercel/next.js/pull/49521 | 3f164abd25e820ef337550b53f9a8994fb38b36e | 8e202610a4256a21f36fcb6f8cac965cc2c9be55 | "2022-10-29T19:41:17Z" | javascript | "2023-05-28T17:29:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,111 | ["docs/basic-features/script.md"] | Link tags do not populate Scripts on renavigation | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Refer to #42088
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Refer to #42088
> The script will only be fetched and executed when this specific page is loaded on the browser.
https://user-images.githubusercontent.com/22056864/198799157-2093bfcb-870c-4fd6-9f5f-1c0c767af619.mov
> If you need to execute some code after the script has loaded, you can check out the onLoad or onReady [event callbacaks](https://nextjs.org/docs/basic-features/script#executing-additional-code).
That is the only main script that is supposed to be loaded... Which is not being loaded using link as noted in the recording.
**It has been an issue since 2018.** Unless I missed something from the docs that say there is another way to handle this..
#42088 has been closed too early.
Currently I am using a tag which refreshes the page, where as link tag doesnt Which is the main reason IMO this doesnt load it.
### Expected Behavior
Refer to #42088
### Link to reproduction
https://github.com/temrb/next-link-issue
### To Reproduce
https://github.com/temrb/next-link-issue
| https://github.com/vercel/next.js/issues/42111 | https://github.com/vercel/next.js/pull/42260 | 76fdd256cc4d41d95d6205484dcb56ed5d1aed22 | 460e19f0aa3799c8cb2b12485fca387120bb3a45 | "2022-10-29T03:09:01Z" | javascript | "2022-11-02T03:38:15Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,046 | ["docs/upgrading.md"] | Docs: Upgrade Guide 12 to13, command is missing @latest | ### What is the improvement or update you wish to see?
docs on Upgrade Guide, [Upgrading from 12 to 13](https://nextjs.org/docs/upgrading#upgrading-from-12-to-13).
### Is there any context that might help us understand?
I just follow the script
`npm install next react@latest react-dom@latest eslint-config-next`
and the result is next is not changed on package.json.
it seems that command are missing `@latest` ??
```
npm install next@latest react@latest react-dom@latest eslint-config-next@latest
```
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/upgrading | https://github.com/vercel/next.js/issues/42046 | https://github.com/vercel/next.js/pull/42073 | 57426a2849b259618cebca428ba125c75c8d2ab5 | cff07455e783a3b53a7765113bf231032fca0cbc | "2022-10-28T09:38:29Z" | javascript | "2022-10-28T18:06:47Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,042 | ["packages/next/build/webpack/plugins/flight-types-plugin.ts"] | next app typings aren't compatible with `noUnusedLocals` | I'm using typescript with `"noUnusedLocals": true,` and I'm getting this error at build time

_Originally posted by @imranbarbhuiya in https://github.com/vercel/next.js/discussions/41745#discussioncomment-3972703_ | https://github.com/vercel/next.js/issues/42042 | https://github.com/vercel/next.js/pull/43226 | 3a2af8fb0bdaabc7ca5ae7f06ddd929c91b0c88c | 7596132a0cb8d5730463a4c2353dffac4a14ff79 | "2022-10-28T08:18:06Z" | javascript | "2022-11-22T12:49:01Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,024 | ["packages/next/build/webpack/plugins/flight-client-entry-plugin.ts", "packages/next/build/webpack/plugins/flight-manifest-plugin.ts"] | NextJs 13 - Unable to render components client-side using `use client;` | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 16.18.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.1-canary.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome Version 106.0.5249.119
### How are you deploying your application? (if relevant)
npm run dev
### Describe the Bug
In trying to use the new `app` directory way of setting up an application and trying to mix server-renderer components and client-side rendered components often time fails with a cryptic error. To render components client-side, I am just using the "use client"; command at the top of the component. Removing this and rendering the all the components server-side works fine without issue. The reason for using client-side components is to bring in React client side functionality.
### Expected Behavior
Component should render client side.
### Link to reproduction
https://github.com/kukicado/next13-useclient-issue
### To Reproduce
1. Start up server and navigate to localhost:3000
2. Navigate to localhost:3000/123
3. Navigate to localhost:3000/123/567
4. Navigate back to localhost:3000/123
Error displayed:
```
TypeError: Cannot read properties of undefined (reading 'default')
at resolveModuleMetaData (webpack-internal:///(sc_server)/./node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:195:82)
at serializeModuleReference (webpack-internal:///(sc_server)/./node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1298:50)
at resolveModelToJSON (webpack-internal:///(sc_server)/./node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1660:40)
at Array.toJSON (webpack-internal:///(sc_server)/./node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1081:40)
at stringify (<anonymous>)
at processModelChunk (webpack-internal:///(sc_server)/./node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:163:36)
at retryTask (webpack-internal:///(sc_server)/./node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1823:50)
at performWork (webpack-internal:///(sc_server)/./node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1856:33)
at AsyncLocalStorage.run (node:async_hooks:330:14)
at eval (webpack-internal:///(sc_server)/./node_modules/next/dist/compiled/react-server-dom-webpack/server.browser.js:1934:55)
``` | https://github.com/vercel/next.js/issues/42024 | https://github.com/vercel/next.js/pull/42421 | 4af50116cd696b8cb25a40dd81e861373617d33d | 83e19a25577d0fc3dba4e189bac45755d0f43acd | "2022-10-28T00:22:13Z" | javascript | "2022-11-03T17:46:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 42,010 | ["packages/next/build/webpack/loaders/next-app-loader.ts", "test/e2e/app-dir/app/app/dashboard/page/page.jsx", "test/e2e/app-dir/index.test.ts"] | Creating `app/page/page.tsx` maps to `app/page.tsx` | Creating a page at route `/page` by making a file at `app/page/page.tsx` gets mapped to `app/page.tsx`, so basically `/page` route renders the same content as the `/` route. This doesn't seem to be the expected behavior.
_Originally posted by @bhavesh-chaudhari in https://github.com/vercel/next.js/discussions/41745#discussioncomment-3966674_
Reproduction repository: https://github.com/balazsorban44/42010 | https://github.com/vercel/next.js/issues/42010 | https://github.com/vercel/next.js/pull/42348 | 468f2c48b1da674a7842498905ba2372298241fb | b69dac121ac6b9d72d1eae9da5db5cd4f1dcc334 | "2022-10-27T21:49:26Z" | javascript | "2022-11-02T15:16:59Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,995 | ["packages/next/build/entries.ts", "packages/next/build/index.ts", "packages/next/build/utils.ts", "packages/next/cli/next-dev.ts", "packages/next/server/dev/next-dev-server.ts", "test/e2e/app-dir/app-middleware.test.ts", "test/e2e/app-dir/app-middleware/next.config.js"] | Middleware does not work in Next.js 13 when the /pages directory is removed | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101
Binaries:
Node: 18.10.0
npm: 8.19.2
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.1-canary.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
106.0.5249.119
### How are you deploying your application? (if relevant)
n/a
### Describe the Bug
Removing the `pages` directory prevents Next.js middleware from running.
### Expected Behavior
The middleware should work with the new `app` directory when the `pages` directory does not exist.
### Link to reproduction
https://github.com/jamescmartinez/nextjs13-middlware-appdir-bug
### To Reproduce
1. `npm run dev` to start the app
2. `open http://localhost:3000/page2` to open `/page2` in your browser, noting that `/page2` does not redirect to `/` as configured in `middleware.ts`
3. stop the dev server
4. `mkdir pages` to create an empty pages directory
5. `npm run dev` to start the app
6. `open http://localhost:3000/page2` to open `/page2` in your browser, noting that `/page2` now redirects to `/` | https://github.com/vercel/next.js/issues/41995 | https://github.com/vercel/next.js/pull/43205 | 5d39daaf1c5d4ce530ae336010045e7bc7316f02 | ee969ea8fc15105839393692e480786ab596646e | "2022-10-27T18:42:08Z" | javascript | "2022-11-21T23:37:58Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,992 | ["packages/next-swc/Cargo.lock", "packages/next-swc/crates/core/Cargo.toml", "packages/next-swc/crates/core/tests/full.rs", "packages/next-swc/crates/core/tests/telemetry.rs", "packages/next-swc/crates/napi/Cargo.toml", "packages/next-swc/crates/napi/src/minify.rs", "packages/next-swc/crates/napi/src/transform.rs", "packages/next-swc/crates/wasm/Cargo.toml", "packages/next-swc/crates/wasm/src/lib.rs", "test/unit/next-swc.test.ts"] | swcMinify causes production builds to generate incorrect swagger documentation using `next-swagger-doc` | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #202210150742~1666053244~22.04~cf07008 SMP PREEMPT_DYNAMIC Tue O
Binaries:
Node: 17.2.0
npm: 8.1.4
Yarn: 1.22.17
pnpm: N/A
Relevant packages:
next: 13.0.1-canary.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Setting `swcMinify: true` in next config causes parameter arrays in OpenAPI documentation generated by next-swagger-doc / swagger-jsdoc to render only the last parameter in the array.
### Expected Behavior
dev and prod output should not be different
### Link to reproduction
https://github.com/billythedummy/swcminify-swagger-bug
### To Reproduce
- `yarn install` to install dependencies
- When you run `yarn dev`, you should see all 3 params in the swagger documentation generated from the jsdoc in `pages/api/hello.ts`:

- However, when you create a production build with `yarn build` and run the production server with `yarn start`, all params but param3 are gone:

The root cause seems to be somewhere in swcMinify. Setting `swcMinify: false` in `next.config.js` and running `yarn build` and `yarn start` again results in the correct output.
| https://github.com/vercel/next.js/issues/41992 | https://github.com/vercel/next.js/pull/42326 | 00df9f3533ce57e138639291e041747d6b8b9c16 | 670f2a8a6d2e96cd488c72842e535c41d3dd7b50 | "2022-10-27T16:35:03Z" | javascript | "2022-11-04T01:37:36Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,925 | ["packages/next-codemod/transforms/__testfixtures__/new-link/handle-duplicate-props.input.js", "packages/next-codemod/transforms/__testfixtures__/new-link/handle-duplicate-props.output.js", "packages/next-codemod/transforms/__tests__/new-link.test.js", "packages/next-codemod/transforms/new-link.ts"] | Duplicate props with `@next/codemod new-link` | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
I'm not sure this is super relevant as it's related to the `@next/codemod` package, but here you go:
```
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64
Binaries:
Node: 14.20.0
npm: 6.14.17
Yarn: 1.22.5
pnpm: N/A
Relevant packages:
next: 13.0.0
eslint-config-next: 12.1.6
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
I _think_ I may have used the `<Link />` API incorrectly, so I'm not sure this falls into the path of something that should be handled by the mod, but I ran:
```sh
npx @next/codemod new-link .
```
And it worked, but I had to manually go thru and fix `No duplicate props allowed react/jsx-no-duplicate-props` errors because all of my links had _two_ `href` attributes after the mod.
Easy enough to fix, but I thought I'd throw it out there as something maybe the codemod could account for?
```jsx
<Link href={href} href={href} />
```
### Expected Behavior
I should only see one `href` attribute.
### Link to reproduction
NA
### To Reproduce
This should happen on any `next` repo with a `<Link href={href} /><a href={href}></a></Link>` element structure. | https://github.com/vercel/next.js/issues/41925 | https://github.com/vercel/next.js/pull/42158 | ab42da0626d10a021146cd8fbca7308e4efafbad | 29c5acd33b0754757e31cf724ed9b0ff83065234 | "2022-10-27T02:08:42Z" | javascript | "2022-10-30T20:09:14Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,901 | ["packages/next/build/webpack/plugins/flight-types-plugin.ts"] | Type error: PageComponent/LayoutComponent is declared but never used | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 16.17.0
npm: 8.15.0
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
When adding `"noUnusedLocals": true` to tsconfig.json and running a type-check with `npx tsc` (or `next build`), it fails due to declared but unused types:
```
.next/types/app/layout.ts:17:6 - error TS6196: 'PageComponent' is declared but never used.
17 type PageComponent = (props: PageProps) => React.ReactNode | Promise<React.ReactNode>
~~~~~~~~~~~~~
.next/types/app/page.ts:18:6 - error TS6196: 'LayoutComponent' is declared but never used.
18 type LayoutComponent = (props: LayoutProps) => React.ReactNode | Promise<React.ReactNode>
~~~~~~~~~~~~~~~
```
### Expected Behavior
No type errors.
### Link to reproduction
https://github.com/richardkall/next-bug-repro
### To Reproduce
1. Clone repo.
2. Run `npm install`
3. Run `npm run build` | https://github.com/vercel/next.js/issues/41901 | https://github.com/vercel/next.js/pull/43226 | 3a2af8fb0bdaabc7ca5ae7f06ddd929c91b0c88c | 7596132a0cb8d5730463a4c2353dffac4a14ff79 | "2022-10-26T21:22:18Z" | javascript | "2022-11-22T12:49:01Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,900 | ["errors/google-fonts-missing-subsets.md", "errors/manifest.json", "packages/font/README.md", "packages/font/src/google/loader.ts"] | New @next/font has broken documentation link | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Next.js 13
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
The README in the new `@next/font` package points to a non-existent URL:
https://github.com/vercel/next.js/tree/canary/packages/font
Points to this URL which returns a 404:
https://nextjs.org/docs/optimizing/fonts
### Expected Behavior
Does not link to 404 page
### Link to reproduction
https://nextjs.org/docs/optimizing/fonts
### To Reproduce
Click https://nextjs.org/docs/optimizing/fonts from README at https://github.com/vercel/next.js/tree/canary/packages/font | https://github.com/vercel/next.js/issues/41900 | https://github.com/vercel/next.js/pull/41910 | edba9396a80a4115f4b0b49dff2e55370f245370 | e64bf9851187ac2464d6ec58471b88d41165d91c | "2022-10-26T21:20:17Z" | javascript | "2022-10-27T06:00:40Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,884 | ["packages/next/build/webpack/plugins/flight-types-plugin.ts"] | Next 13: Missing Types for generateStaticParams | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000
Binaries:
Node: 16.18.0
npm: 8.19.2
Yarn: 1.22.19
pnpm: 7.13.4
Relevant packages:
next: 13.0.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
A next 13 app with typescript and `generateStaticParams` can not be build. The following code works in dev mode, but fails on build:
```tsx
import { use } from "react";
import { fetchPeople, fetchPeoples } from "../../../lib/people";
type Params = {
id: string;
};
type Props = {
params: Params;
};
const People = ({ params }: Props) => {
const people = use(fetchPeople(params.id));
return (
<>
<h1>{people.name}</h1>
</>
);
};
export const generateStaticParams = async (): Promise<Params[]> => {
const peoples = await fetchPeoples();
const result = peoples.map((people) => ({
id: people.id,
}));
return result;
}
export default People;
```
The build fails with the following error:
```
Type error: Page "app/people/[id]/page.tsx" does not match the required types of a Next.js Page.
Invalid configuration:
The exported page component isn't correctly typed.
Expected "Props", got "PageProps".
Invalid configuration:
Expected "Params", got "PageParams | undefined".
Expected "Params", got "undefined".
```
Sadly i was not able to find the mentioned types of the error.
Have a look at the following discussions for more informations:
* https://github.com/vercel/next.js/discussions/41826#discussioncomment-3966869
* https://github.com/vercel/next.js/discussions/41745#discussioncomment-3971314
### Expected Behavior
The example above can be build or the required types are exported.
### Link to reproduction
https://github.com/sdorra/next-13-missing-types
### To Reproduce
Run `pnpm build` in the example repository | https://github.com/vercel/next.js/issues/41884 | https://github.com/vercel/next.js/pull/42019 | 3618b9017e6172fbb9038303e12c1dfe7a9365f2 | 491a21b5f14834f3827ca2cf73d9d24be8754247 | "2022-10-26T18:48:58Z" | javascript | "2022-10-27T23:53:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,879 | ["packages/next/client/components/navigation.ts", "test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/[...catchall]/page.js", "test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/layout.js", "test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/layout.js", "test/e2e/app-dir/index.test.ts"] | useSelectedLayoutSegment throws error on root/home | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
next info:
```
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 16.17.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 12.3.2-canary.43
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
next dev
### Describe the Bug
Using the new app layouts, when at root layout (localhost:3000/) if using `useSelectedLayoutSegment` this error is thrown:
_Error: No selected layout segment below the current level_###
### Expected Behavior
As I understand, `useSelectedLayoutSegment()` should be equal to an empty string in this case.
### Link to reproduction
https://stackblitz.com/edit/vercel-next-js-fdhawa?file=app/nav-link.js
### To Reproduce
Use `useSelectedLayoutSegment()` on a component of the layout. | https://github.com/vercel/next.js/issues/41879 | https://github.com/vercel/next.js/pull/42299 | 9de871e61be72ba8bd4040ed0b7fdc531edf8c0b | 8350f7efb20c7041a3a9c72b20aecdfb7ea97d8a | "2022-10-26T18:16:02Z" | javascript | "2022-11-02T22:06:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,878 | ["packages/next/client/components/navigation.ts", "test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/[...catchall]/page.js", "test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/layout.js", "test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/layout.js", "test/e2e/app-dir/index.test.ts"] | Error: No selected layout segment below the current level | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Wed, 05 Oct 2022 12:15:15 +0000
Binaries:
Node: 16.16.0
npm: 8.11.0
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 12.3.2-canary.43
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Brave
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
I was following guide from Next.js Conf (Stage J) for Next.js 13, and I keep getting this error `Error: No selected layout segment below the current level` when trying to use `useSelectedLayoutSegment` hook in client component
```
"use client"
import Link from 'next/link'
import { useSelectedLayoutSegment } from 'next/navigation'
export default function NavLink({ href, children }: React.PropsWithChildren<{ href: string }>) {
let segment = useSelectedLayoutSegment();
let active = href === `/${segment}`
return <Link className={active && 'text-blue-700' || ''} href={href}>{children}</Link>
}
```
### Expected Behavior
I can use `useSelectedLayoutSegment` hook in a way i believe it works in client component
### Link to reproduction
https://github.com/TurniXXD/next-13
### To Reproduce
- Create new Next.js 13 app with typescript
- I have enabled the `experimental: { appDir: true }` config
- Add tailwindcss
- Add new components and pages
- Try to use hook in client component | https://github.com/vercel/next.js/issues/41878 | https://github.com/vercel/next.js/pull/42299 | 9de871e61be72ba8bd4040ed0b7fdc531edf8c0b | 8350f7efb20c7041a3a9c72b20aecdfb7ea97d8a | "2022-10-26T18:14:08Z" | javascript | "2022-11-02T22:06:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,870 | ["packages/next/build/webpack-config.ts"] | [Next 13] - Multiple versions of React is shipped. One page has 2x the bundle size without any libraries. | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Sat Jun 18 17:05:47 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T8101
Binaries:
Node: 18.10.0
npm: 8.19.2
Yarn: 1.22.17
pnpm: 7.5.0
Relevant packages:
next: 13.0.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome 106.0.5249.119
### How are you deploying your application? (if relevant)
next start
### Describe the Bug
When building my app this is the result:
```bash
Route (app) Size First Load JS
┌ ○ / 0 B 0 B
├ ○ /dashboard 105 B 66.6 kB
├ ○ /dashboard/users 186 B 141 kB // What is going on here?
└ λ /dashboard/users/[id] 4.59 kB 75.7 kB
+ First Load JS shared by all 66.5 kB
├ chunks/main-app-fd902262245ffaed.js 64.5 kB
└ chunks/webpack-8876bb8973ebf277.js 2.07 kB
Route (pages) Size First Load JS
─ ○ /404 179 B 79.8 kB
+ First Load JS shared by all 79.6 kB
├ chunks/main-d4cdf33ec41ad030.js 77.3 kB
├ chunks/pages/_app-4e5b418629f6f9e0.js 193 B
└ chunks/webpack-8876bb8973ebf277.js 2.07 kB
```
It appears that Next is bundling 2 instances of React for the endpoint `/dashboard/users`. This has resulted in a 2x bundle increase on this particular page, and I cannot seem to figure out why.
I've fired up the bundle analyzer and see that a specific chunk includes both next.js and react + react-dom, and its not the main bundle.
I have attempted running with `swcMinify` & without. Same result.
### Expected Behavior
Dual versions of React should not be shipped randomly on a page.
### Link to reproduction
https://github.com/sannajammeh/next-13-dual-react
### To Reproduce
1. Git clone
2. pnpm install
3. next build
4. Observe /dashboard/users has double the size despite not needing it.
5. Run `ANALYZE=true next build` and observe the chunk shipped with code identical to `main-...` with some exceptions in the Next runtime.
| https://github.com/vercel/next.js/issues/41870 | https://github.com/vercel/next.js/pull/41997 | 2e9e54b64f4162db215c26105deb192b00bd6d55 | b512f8d8b5d6db4eec02ee9ef86cd1f14334834d | "2022-10-26T17:10:36Z" | javascript | "2022-10-27T20:13:16Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,853 | [".vscode/launch.json", "packages/next/server/config.ts", "test/e2e/app-dir/app/api-server.js", "test/e2e/app-dir/app/app/very-large-data-fetch/page.js", "test/e2e/app-dir/index.test.ts"] | Next 13 fetch in server component stuck forever if response is larger than ~15kb | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: Ubuntu 20.04.0 LTS Wed Oct 26 2022 14:44:18 GMT+0200 (Central European Summer Time)
Binaries:
Node: 16.14.2
npm: 7.17.0
Yarn: 1.22.19
pnpm: 7.13.6
Relevant packages:
next: 13.0.0
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
When fetching data [as described in the docs](https://beta.nextjs.org/docs/data-fetching/fetching), the fetch function gets stuck and never resolves, if the payload reaches a certain size.
I created a minimal stackblitz and a mock api to reproduce the problem. If I fetch 75 posts from the mock api it will never resolve, if I only fetch 50 it works fine. Since I was able to reproduce this problem with multiple mock apis and even when using something like supabase to fetch some data I think it might be a size issue? Here the difference is 14kb vs 20kb for the two requests.
_**EDIT:**_
I tried to nail the problem down further. fetch does indeed resolve but `.json()` does not. Does this have to do with the highWaterMark buffer size limit on nodejs streams?
### Expected Behavior
Fetch should not get stuck forever.
### Link to reproduction
https://stackblitz.com/edit/nextjs-vv7ryj?file=app/page.tsx
### To Reproduce
- Open the stackblitz
- Comment out line 3 and comment in in line 4 in `pages.tsx` to fetch 75 instead of 50 posts
- See that fetch never resolves | https://github.com/vercel/next.js/issues/41853 | https://github.com/vercel/next.js/pull/42025 | 6d53e8b34f781a571df0ad2e25fcd23cb0e9357e | 2e6588d028a94c74d6f37fa66058b707410dbad4 | "2022-10-26T12:55:42Z" | javascript | "2022-10-30T15:52:35Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,832 | ["examples/with-aphrodite/pages/_document.js"] | Aphrodite example fails with React 18 | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
`react: 18.2.0`
`react-dom: 18.2.0`
### Which example does this report relate to?
with-aphrodite
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
When running the `with-aphrodite` example using React 18.2.0 you get this error:
```
Error: "MyDocument.getInitialProps()" should resolve to an object with a "html" prop set with a valid html string
```
### Expected Behavior
The example should render without an error.
### To Reproduce
Install the `with-aphrodite` example and change the `react` and `react-dom` dependency versions from `17.0.2` to `18.2.0` | https://github.com/vercel/next.js/issues/41832 | https://github.com/vercel/next.js/pull/42078 | d07ae3484f3ac9791301f33d15f53986b1000474 | e2a98cdf3d6ebd03696c53d60739d2506e7d6e9a | "2022-10-26T08:02:32Z" | javascript | "2022-10-28T18:33:05Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,824 | ["packages/next/src/client/components/app-router.tsx", "test/e2e/app-dir/app-basepath/app/another/page.js", "test/e2e/app-dir/app-basepath/app/layout.js", "test/e2e/app-dir/app-basepath/app/page.js", "test/e2e/app-dir/app-basepath/index.test.ts", "test/e2e/app-dir/app-basepath/next.config.js"] | /basePath redirects to root in NextJS 13 (appDir) | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000
Binaries:
Node: 16.14.0
npm: 8.3.1
Yarn: 1.22.18
pnpm: N/A
Relevant packages:
next: 13.0.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Firefox 106.0.1
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
In NextJS 13, the document at `/myapp` instantly redirects to the root path `/`.
```js
const nextConfig = {
basePath: '/myapp',
experimental: { appDir: true },
reactStrictMode: true,
swcMinify: true,
}
```
During this redirect, or `replaceState`, the `/myapp` entry is not registered in history.
While the root `app/layout.tsx` and `app/page.tsx` is now rendered on screen, the website becomes a `404` if we reload the location `/` without the `/myapp` segment.
It would appear that `basePath` works differently or not at all in version 13 👀
### Expected Behavior
The `/{basePath}` should stick around in the location so that we can reload forever.
### Link to reproduction
https://github.com/wiredearp/basepath-redirect
### To Reproduce
Create a website with `create-next-app`, set `basePath` and enable `appDir`. Then `run dev` and visit the `/{basePath}` to witness the redirect. This setup can be cloned from the reproduction repo. Thanks for digging in! | https://github.com/vercel/next.js/issues/41824 | https://github.com/vercel/next.js/pull/45771 | be5fd6cee00311c9b76c6d67c382989fc3efba31 | 1c5983fe95b79cc9ea1e52d19e69adf7827eda5a | "2022-10-26T05:15:27Z" | javascript | "2023-02-10T13:01:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,808 | ["packages/next/lib/typescript/writeVscodeConfigurations.ts"] | Running the dev server is overwriting my vscode settings file, and updating my .gitignore | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000
Binaries:
Node: 16.14.0
npm: 8.3.1
Yarn: 1.22.19
pnpm: 7.13.4
Relevant packages:
next: 12.3.2-canary.43
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Chrome
### How are you deploying your application? (if relevant)
N/A
### Describe the Bug
I have a `settings.json` file in my project's `.vscode` folder. It has some settings in there that I need for my project. However, running `next dev` wipes this file and replaces it with some kind of TypeScript settings.
Before
```json
{
"css.customData": [".vscode/css.json"],
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
```
After
```diff
{
- "css.customData": [".vscode/css.json"],
- "editor.formatOnSave": true,
- "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "typescript.tsdk": "./node_modules/typescript/lib",
+ "typescript.enablePromptUseWorkspaceTsdk": true
}
```
Also, I want to push this folder to git. Currently my `.gitignore` keeps being updated with a new `.vscode` line added to it, which I don't want.
This bug appears to exist in both the latest canary release and 13.0.0
### Expected Behavior
Don't remove my settings. Add the lines to the existing JSON file instead of overwriting the file. Also, don't force me to ignore the `.vscode` folder if I DO want to add it to git.
### Link to reproduction
N/A
### To Reproduce
1. Create a `.vscode` folder
2. Add a `settings.json` file to that folder
3. Add any JSON
4. Run `next dev` | https://github.com/vercel/next.js/issues/41808 | https://github.com/vercel/next.js/pull/42169 | 56dd821a714cd6dd362dd4e9a5166f1ba3b48e7b | 9ac42fd6f3fe143f32662487a6586e49acab3194 | "2022-10-25T21:58:18Z" | javascript | "2022-10-30T08:51:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,791 | ["packages/next/build/webpack/plugins/flight-client-entry-plugin.ts", "test/e2e/app-dir/app/app/css/css-client/inner/ClientComponent.module.css", "test/e2e/app-dir/app/app/css/css-client/inner/foo.js", "test/e2e/app-dir/app/app/css/css-client/inner/page.js", "test/e2e/app-dir/index.test.ts"] | [appDir] Next.js can't pickup css imports from client components | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: Ubuntu 20.04.0 LTS Wed Oct 26 2022 00:58:23 GMT+0800 (China Standard Time)
Binaries:
Node: 16.14.2
npm: 7.17.0
Yarn: 1.22.19
pnpm: 7.13.6
Relevant packages:
next: 12.3.2-canary.43
eslint-config-next: N/A
react: 18.3.0-next-fecc288b7-20221025
react-dom: 18.3.0-next-fecc288b7-20221025
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
When using `experimental.appDir`, Next.js can not pick the CSS import from React Client Components located under the `app` dir. Both CSS Modules and Global Stylesheets can't work.
cc @shuding
### Expected Behavior
The imported CSS should be collected, processed, and then bundled by Next.js.
### Link to reproduction
https://stackblitz.com/edit/nextjs-4ur55n
### To Reproduce
Open the reproduction from stackblitz attached above:
<img width="1918" alt="image" src="https://user-images.githubusercontent.com/40715044/197837739-a008b9a5-e7fc-4292-be0b-c2d0505ca625.png">
| https://github.com/vercel/next.js/issues/41791 | https://github.com/vercel/next.js/pull/42077 | 80843e1a2b043d10778ba489844756ccce907b40 | 984bd77bdc28a78a1a7a5840df9cec704c17f98a | "2022-10-25T17:11:27Z" | javascript | "2022-10-28T21:43:50Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,624 | ["packages/next/shared/lib/router/router.ts", "test/integration/rewrites-manual-href-as/next.config.js", "test/integration/rewrites-manual-href-as/pages/news/[[...slugs]].js", "test/integration/rewrites-manual-href-as/pages/preview/[slug].js", "test/integration/rewrites-manual-href-as/test/index.test.js"] | next/link `as` prop throw an error with optional catch all routes using URL Object syntax | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022
Binaries:
Node: 14.17.0
npm: 6.14.13
Yarn: 1.22.17
pnpm: N/A
Relevant packages:
next: 12.3.2-canary.32
eslint-config-next: N/A
react: 17.0.2
react-dom: 17.0.2
### What browser are you using? (if relevant)
All
### How are you deploying your application? (if relevant)
Both `next dev` and `next start`
### Describe the Bug
Given the following pages structure:
```
/pages
L /news
L [[...news]].js
```
And the following rewrite:
```js
async rewrites() {
return [
{
source: '/blog/:slug*',
destination: '/news/:slug*',
},
]
}
```
This works (or seems to work but prefetch fails, see [this issue](https://github.com/vercel/next.js/issues/35696): I get rid of it using URL Object syntax with non optional catch all routes, but... please read further):
```
<Link href="/news" as="/blog">Blog</Link>
```
But using URL Object syntax, it does not work at all:
```
<Link href={{ pathname: '/news/[[...slug]]' }} as="/blog">Blog</Link>
```
Neither this:
```
<Link href={{ pathname: '/news/[[...slug]]', query: { slug: [] } }} as="/blog">Blog</Link>
```
The last two throw the following error on click: ``Error: The provided `as` value (/blog) is incompatible with the `href` value (/news/[[...slug]]). Read more: https://nextjs.org/docs/messages/incompatible-href-as``.
### Expected Behavior
URL Object syntax should work as well as string synthax.
### Link to reproduction
[Github repo](https://github.com/cvolant/next-optional-catch-all-as-issue)
[Codesandbox](https://codesandbox.io/s/github/cvolant/next-optional-catch-all-as-issue)
[Codesandbox deployment](https://f721og.sse.codesandbox.io/blog)
### To Reproduce
Just visit the above [Codesandbox deployment](https://f721og.sse.codesandbox.io/blog), and try the links. | https://github.com/vercel/next.js/issues/41624 | https://github.com/vercel/next.js/pull/42355 | 2b85da7735a12f8b7c46de2b45b714607d67c134 | 101a70ba8d3952ce70516539e98c27bfe85c5543 | "2022-10-21T12:21:53Z" | javascript | "2022-11-10T04:48:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,545 | ["examples/with-stripe-typescript/components/Cart.tsx", "examples/with-stripe-typescript/components/CartSummary.tsx", "examples/with-stripe-typescript/components/ClearCart.tsx", "examples/with-stripe-typescript/components/Products.tsx", "examples/with-stripe-typescript/package.json"] | `examples/with-stripe-typescript` `npm install` fails with 'Could not resolve dependency: npm ERR! peer react@"^16.11.0" from [email protected]' | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
$ node --version ; npm --version
v16.18.0
8.19.2
```
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
```
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.11.0" from [email protected]
npm ERR! node_modules/swr
npm ERR! swr@"^0.1.16" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See .npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! .npm/_logs/2022-10-19T04_13_23_398Z-debug-0.log
```
### Expected Behavior
Install without error
### Link to reproduction
N/A
### To Reproduce
```sh
$ git clone --depth=1 https://github.com/vercel/next.js -b canary
$ cd next.js/examples/with-stripe-typescript
$ npm i
``` | https://github.com/vercel/next.js/issues/41545 | https://github.com/vercel/next.js/pull/41550 | 2d1f72995bd4632a3bc452799cff7b73cd541fe7 | 9ac231a0b4f4e9cbd8fffe1f9155962f5b212df4 | "2022-10-19T04:17:07Z" | javascript | "2022-10-19T09:22:50Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,527 | ["packages/next-swc/Cargo.lock", "packages/next-swc/crates/core/Cargo.toml", "packages/next-swc/crates/emotion/Cargo.toml", "packages/next-swc/crates/modularize_imports/Cargo.toml", "packages/next-swc/crates/napi/Cargo.toml", "packages/next-swc/crates/styled_components/Cargo.toml", "packages/next-swc/crates/styled_jsx/Cargo.toml", "packages/next-swc/crates/wasm/Cargo.toml"] | swcMinifier change the logical behavior of a some code | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: Ubuntu 20.04.0 LTS Tue Oct 18 2022 18:22:36 GMT+0200 (Central European Summer Time)
Binaries:
Node: 16.14.2
npm: 7.17.0
Yarn: 1.22.19
pnpm: 7.13.0
Relevant packages:
next: 12.3.1
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
The code at line 92 of the toolbar of react-quill
https://github.com/quilljs/quill/blob/20f4c45258af235f5be4a2b7f5411c9b5a9e620e/modules/toolbar.ts#L92
it's meant to format the text based on the selected element inside a `<select>` in the toolbar. This get's correctily minified by react-quill build process:
```javascript
s=!u.hasAttribute("selected")&&(u.value||!1)
```
but this code will later be re-minified by next.js swcMinifier in a logically similar but behavior-ally different code
```javascript
s=!u.hasAttribute("selected")&&!!u.value
```
This lead to the unusability of react-quill inside Next.JS unless you disable the swcMinifier (given that the former minification always cast the value to a boolean the changes will never apply).
This is also a silent bug since there are no error and in development everything works fine.
### Expected Behavior
the minified code should have the same logic as the unminified one
### Link to reproduction
https://stackblitz.com/edit/react-quill-repro?file=next.config.js
### To Reproduce
1. Visit [this stackblitz](https://stackblitz.com/edit/react-quill-repro?file=next.config.js)
2. In the integrated terminal run `npm run dev`
3. Try to write something and change either the font, the size or the color. Everything will work fine.
4. Stop the dev server with CTRL+C
5. run `npm run build`
6. run `npm run start`
7. Try to write something and change either the font, the size or the color. This times neither will work.
8. Change next.config.js removing `swcMinify: true`
9. run `npm run build`
10. run `npm run start`
11. Try to write something and change either the font, the size or the color. This times everything will work fine. | https://github.com/vercel/next.js/issues/41527 | https://github.com/vercel/next.js/pull/41544 | cff9fc9d746ec946c51c49b4b1560ad5e4b4fc2e | 7bde099a43f2c39730107c326c2c494bef484f0d | "2022-10-18T16:25:43Z" | javascript | "2022-10-19T03:04:32Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,476 | ["packages/next/build/webpack-config.ts", "test/development/project-directory-with-styled-jsx-suffix/index.test.ts", "test/lib/create-next-install.js", "test/lib/e2e-utils.ts", "test/lib/next-modes/base.ts"] | NextJS 12.3.x doesn't remove FOUC style (body hidden) | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
```
Operating System:
Platform: linux
Arch: x64
Version: #56-Ubuntu SMP Tue Sep 20 13:23:26 UTC 2022
Binaries:
Node: 16.17.0
npm: 8.15.0
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 12.3.2-canary.29
eslint-config-next: 12.3.1
react: 18.2.0
react-dom: 18.2.0
```
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
NextJS in dev mode adds this markup to the html head:
```html
<style data-next-hide-fouc="true">body{display:none}</style>
<noscript data-next-hide-fouc="true">
<style>body{display:block}</style>
</noscript>
```
As a result the page is not displayed.
### Expected Behavior
It should remove this FOUC protection, or what is its name.
### Link to reproduction
https://github.com/OnkelTem/demo-styled-jsx
### To Reproduce
To reproduce with the referenced repository:
```
$ npm run dev
```
OR to reproduce from scratch:
```
$ npx create-next-app@latest --ts demo-styled-jsx
$ cd demo-styled-jsx
$ npm run dev
```
THEN open the page in your browser.
| https://github.com/vercel/next.js/issues/41476 | https://github.com/vercel/next.js/pull/41484 | 4ba1002175397c8ae4432698706fd458f9cf7313 | 422ccb98b881816bd8f32b11d867dc5765292c10 | "2022-10-17T10:04:14Z" | javascript | "2022-10-19T19:01:48Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,456 | ["packages/next/lib/find-pages-dir.ts", "packages/next/server/dev/next-dev-server.ts", "packages/next/server/next-server.ts", "test/e2e/app-dir/app-alias/src/app/button/page.tsx", "test/e2e/app-dir/app-alias/src/app/layout.tsx"] | does not compile `src/app` folder in `dev` | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #42-Ubuntu SMP Thu May 19 05:03:08 UTC 2022
Binaries:
Node: 16.17.1
npm: 8.15.0
Yarn: 3.2.4
pnpm: N/A
Relevant packages:
next: 12.3.2-canary.29
eslint-config-next: N/A
react: 0.0.0-experimental-3b814327e-20221014
react-dom: 0.0.0-experimental-3b814327e-20221014
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
next dev
### Describe the Bug
When you have set experimental `appDir` flag and running `next dev` script, the components inside `src/app` path are not compiled.
### Expected Behavior
We expect the components inside `app` folder be compiled
### Link to reproduction
https://github.com/sviridoff/next_src_app_bug
### To Reproduce
git clone https://github.com/sviridoff/next_src_app_bug
cd next_src_app_bug
yarn
yarn dev
go to localhost:3000/home you will see 404 | https://github.com/vercel/next.js/issues/41456 | https://github.com/vercel/next.js/pull/41458 | 6249307b75ebd21bbf86895cde177d8c6f82fe94 | f5cb7bd829a47e0384adc8f677a83af728f60622 | "2022-10-16T14:06:15Z" | javascript | "2022-10-17T22:32:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,393 | ["packages/next/shared/lib/image-blur-svg.ts", "test/integration/image-optimizer/test/util.ts", "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/index.test.ts", "test/integration/next-image-new/default/test/static.test.ts"] | Next/future/image blur placeholder have undefined to view box SVG width & height | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022
Binaries:
Node: 18.9.0
npm: 8.19.1
Yarn: 1.22.10
pnpm: N/A
Relevant packages:
next: 12.3.1
eslint-config-next: 12.3.1
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
Brave Version 1.44.108 Chromium: 106.0.5249.103
### How are you deploying your application? (if relevant)
Vercel
### Describe the Bug
Wrong SVG viewBox generated when using placeHolder='blur' with image filling his parent
- ### The blur base64
- 
- ### The SVG using the blur base64
- 
As we can see in the `src/blur.svg` the viewBox have weird values
```SVG
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 undefined undefined'>
<filter id='b' color-interpolation-filters='sRGB'>
<feGaussianBlur stdDeviation='20'/>
<feComponentTransfer>
<feFuncA type='discrete' tableValues='1 1'/>
</feComponentTransfer>
</filter>
<image filter='url(#b)' x='0' y='0' height='100%' width='100%' href='data:image/jpeg;base64[...]'/>
</svg>
```
So the svg have this weird artifacts and the black borders
### Expected Behavior
I expected the placeHolder to be rendered without artefacts and with a corect viewBox for the SVG not undefined in width & height
### Link to reproduction
https://next-future-image-issue-sigma.vercel.app/
### To Reproduce
A repo with all the need to reproduce
https://github.com/Balkeo/next-future-image-issue | https://github.com/vercel/next.js/issues/41393 | https://github.com/vercel/next.js/pull/41573 | 422ccb98b881816bd8f32b11d867dc5765292c10 | fe762d329fdf9d6d6e6bf084198ad49f696d42b7 | "2022-10-13T16:50:50Z" | javascript | "2022-10-19T20:21:41Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,395 | ["packages/next/build/index.ts", "packages/next/build/utils.ts", "test/e2e/og-api/index.test.ts"] | og-image doesn't work with output file tracing | Steps to repro:
1. Create a new next js project
2. Install `@vercel/og`
3. Add an og-image API page at: `pages/api/og.tsx`
4. Add `output: "standalone",` to your `next.config.js`
Try to run `next build` to get the following output:
```
warn - You are using an experimental edge runtime, the API might change.
info - Creating an optimized production build .<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (176kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
info - Creating an optimized production build
info - Compiled successfully
> Build error occurred
[Error: ENOENT: no such file or directory, open '/.../.next/server/pages/api/og.js.nft.json'] {
``` | https://github.com/vercel/next.js/issues/41395 | https://github.com/vercel/next.js/pull/43326 | 77738edea8ace901e9f5e0ff12dcf9ea3756d85c | f6106d20fb2cf5a3e634111a2b1b9cc00f188daa | "2022-10-13T02:31:38Z" | javascript | "2022-12-01T03:35:59Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 41,248 | ["packages/next/build/jest/__mocks__/fileMock.js"] | Jest warning when use placeholder="blur" on next/image or next/future/image | ### Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
### Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Fri Apr 2 22:23:49 UTC 2021
Binaries:
Node: 16.17.0
npm: 8.15.0
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 12.3.2-canary.22
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
### What browser are you using? (if relevant)
_No response_
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
I create a fresh install from next with-jest template and create a unique test from a component with next/image and next/future/image, and show the warning bellow:
`
Image with src "/img.jpg" is smaller than 40x40. Consider removing the "placeholder='blur'" property to improve performance.
`

### Expected Behavior
Don't show this warning.
### Link to reproduction
https://codesandbox.io/p/github/ArthurPedroti/test-jest-next-image/main?file=%2Fsrc%2FNextImage%2Ftest.tsx&selection=%5B%7B%22endColumn%22%3A3%2C%22endLineNumber%22%3A11%2C%22startColumn%22%3A3%2C%22startLineNumber%22%3A11%7D%5D&workspace=%257B%2522activeFileId%2522%253A%2522cl8yhm1bg000jltii0l8lbcve%2522%252C%2522openFiles%2522%253A%255B%2522%252FREADME.md%2522%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522sidekickItems%2522%253A%255B%257B%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522cl8yhpftv000alqii48e5atiq%2522%252C%2522key%2522%253A%2522cl8yhpfc900rf3n6j16aet13z%2522%252C%2522isMinimized%2522%253Afalse%257D%252C%257B%2522type%2522%253A%2522PREVIEW%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522port%2522%253A3000%252C%2522key%2522%253A%2522cl8yhpbpq00pn3n6jhruyuw3e%2522%252C%2522isMinimized%2522%253Afalse%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522key%2522%253A%2522cl8yhp53m00nv3n6jgb7k0pxl%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D
### To Reproduce
Only run "npm run test" and will show the error. | https://github.com/vercel/next.js/issues/41248 | https://github.com/vercel/next.js/pull/41329 | a78163dc613f168f991b29018adbc3472004d38b | 2060d0e3e95f60dabdbdd451391af68ed3055790 | "2022-10-07T12:59:17Z" | javascript | "2022-10-11T14:06:54Z" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.