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 | 15,828 | ["packages/next/next-server/lib/document-context.ts", "packages/next/next-server/lib/utils.ts", "packages/next/next-server/server/render.tsx", "packages/next/pages/_document.tsx"] | Support persisting the dev cache buster | Chrome will show a warning if preloaded resources aren't loaded and used with the same URL. We can end up in this situation when streaming if we write preloads with one timestamp, and later generate the actual tags with another.
To prevent this, we need to move the timestamp generation around and stored it in `RenderOpts` so that it can be read and reused (similar to data). | https://github.com/vercel/next.js/issues/15828 | https://github.com/vercel/next.js/pull/15827 | b87e4989e2a8f542b050422c6b049da5393c26a1 | e8c3190255e8023fd44a2b1518724cfbb38a3de9 | "2020-08-03T13:47:44Z" | javascript | "2020-08-03T14:22:55Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,813 | ["examples/with-stripe-typescript/.env.local.example", "examples/with-stripe-typescript/pages/api/payment_intents/index.ts"] | with-stripe-typescript does not work in india due to payment description not provided | # Bug report
## Describe the bug
with-stripe-typescript does not work in india due to payment description not being provided

## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. Setup the with-stripe-typescript example
2. Try to make a payment using one of the sample cards
4. You'll get the error `As per Indian regulations, export transactions require a description. More info here: https://stripe.com/docs/india-exports`
## Expected behavior
The payment should be processed without errors
Ideally, adding a payment description for the site eg. `Software Services` via an environment variable might fix this | https://github.com/vercel/next.js/issues/15813 | https://github.com/vercel/next.js/pull/15888 | fce1830d3518d82854936ade0fdefec8d4ae8247 | 5db2860cc87d8077da3e3ad7ae0cbaf29ae0fb71 | "2020-08-03T06:12:08Z" | javascript | "2020-08-05T06:04:20Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,802 | ["examples/with-electron-typescript/renderer/pages/detail/[id].tsx"] | with-electron-typescript example build error | # Bug report
## Describe the bug
When running:
`yarn build`
You get the error:
> Property 'id' does not exist on type 'ParsedUrlQuery
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. Clone the example: `npx create-next-app --example with-electron-typescript with-electron-typescript-app`
2. Install dependencies: `cd with-electron-typescript-app && yarn install`
3. Run a build: `yarn build`
4. See error
## Expected behavior
No error to occur
## System information
- OS: macOS v10.15.6
- Browser: N/A
- Version of Next.js: v9.5.1
- Version of Node.js: v14.4.0
## Additional context
Can be fixed using types:
```
type Params = {
id?: string
}
const { id } = params as Params
``` | https://github.com/vercel/next.js/issues/15802 | https://github.com/vercel/next.js/pull/15803 | 60f1d58c837ac604ce8fa475bf592457119f82cc | ea026151b2e0d09e82e620f277147e9767e05f5c | "2020-08-02T18:23:11Z" | javascript | "2020-08-03T13:17:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,774 | ["packages/next/build/index.ts", "packages/next/build/webpack-config.ts", "packages/next/client/link.tsx", "packages/next/export/index.ts", "packages/next/next-server/lib/router/rewrite-url-for-export.ts", "packages/next/next-server/lib/router/router.ts", "packages/next/next-server/server/config.ts"] | Proposal: drop exportTrailingSlash. | This is a follow-up on a previous discussion https://github.com/vercel/next.js/discussions/15598. We might have found an improvement opportunity.
Material-UI has been experimenting with `exportTrailingSlash` and the new `trailingSlash` option released in next.js v9.5. From our observations on https://github.com/mui-org/material-ui/pull/22008, it seems that the `exportTrailingSlash` option could be completely replaced with `trailingSlash`.
Is there any use cases for these two options to have a different value? It seems there isn't. Even if there is, it seems that for integrity considerations, the value of `exportTrailingSlash`, when not provided, should equal `trailingSlash`. | https://github.com/vercel/next.js/issues/15774 | https://github.com/vercel/next.js/pull/15768 | e89bcf7e3965783424468463c0cde0b45e32f868 | b87e4989e2a8f542b050422c6b049da5393c26a1 | "2020-08-01T13:02:37Z" | javascript | "2020-08-03T14:03:11Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,769 | ["examples/custom-server-typescript/package.json"] | TypeScript Server - Cannot read property 'kind' of undefined` | # Bug report
## Describe the bug
When running next with TypeScript custom server (as in the example app), there is an error
`TypeError: Cannot read property 'kind' of undefined`
## To Reproduce
1. Run `npx create-next-app my-app`.
2. choose `Example from the Next.js repo`.
3. select `custom-server-typescript` and wait for completion.
4. run dev script `yarn dev`.
You will see the error in the log:
```
error - TypeError: Cannot read property 'kind' of undefined
```
with the stack trace.
Also, if you will navigate to your app in the browser (`http://localhost:3000`) you will see the same error
and after a while (short noticeable delay), you will see the correct app content.
## Expected behavior
No error should be presented
## Screenshots
Terminal:

Browser:

After a while, the browser error disappear
## System information
- OS: Windows
- Browser (if applies) Chrome
- Version of Next.js: 9.5.1 (latest)
- Version of Node.js: 12.16.3
## Additional context
It may be a TypeScript issue?
| https://github.com/vercel/next.js/issues/15769 | https://github.com/vercel/next.js/pull/15833 | 229817d50d7ce5bb472ac579e278a8d26922cf7b | 5be6f25cd7bb21949b375a1c9b74ed9824aa6e8e | "2020-08-01T10:57:54Z" | javascript | "2020-08-05T13:15:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,751 | ["docs/basic-features/fast-refresh.md"] | [Docs] Update Fast Refresh docs to mention React Strict Mode | Our Fast Refresh docs currently say that `useEffect` will re-run after every code change, even if it has no dependencies. This is not only to ensure you always write resilient code, because it's also enforced by React Strict Mode. We should mention this and link to the strict mode docs.
More on this Twitter thread: https://twitter.com/tvernon_tech/status/1289192339819249666 | https://github.com/vercel/next.js/issues/15751 | https://github.com/vercel/next.js/pull/15923 | cbfb8cbcc7b705892dc71e5cf26e870f76cdcc8a | e18f74fe2de0672e372aa6425b6b6313a23b91fa | "2020-07-31T16:46:00Z" | javascript | "2020-08-06T16:34:05Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,747 | ["packages/next/next-server/lib/router/router.ts", "test/integration/basepath-root-catch-all/next.config.js", "test/integration/basepath-root-catch-all/pages/[...parts].js", "test/integration/basepath-root-catch-all/pages/hello.js", "test/integration/basepath-root-catch-all/test/index.test.js"] | Inconsistent url (prefetch/fetch) for .json data file on link click (next/link) when using SSG + basePath | # Bug report
## Describe the bug
Using both SSG and basePath, when next.js tries to get the .json data file that corresponds to the page data (instead of doing full reload), the url that is fetched does not correspond to the location where the file has been physically generated during build/export
## To Reproduce
1. clone: https://github.com/oecd/next-link-basepath-bug
2. npm install
3. npm run build-n-export
4. host the content of the "out" folder so that app is served from "/folder" by any random web server
5. browse http://localhost/folder/home
6. check network tab: http://localhost/folder/_next/data/xxxxxx/another-page.json gives 200
7. click on the "go to another page.." link
8. check network tab: http://localhost/folder/_next/data/xxxxxx/folder/another-page.json gives 404
...so a full reload occurs.
It should be noted that using next.js server (npm run start), the inconsistency in urls are still there but both urls give 200!
There must be some magic somewhere! ;)
## Expected behavior
Both prefetch and fetch should use the same url and that url should correspond to the location where the files are generated.
## System information
- OS: Windows
- Browser: all
- Version of Next.js: 9.5.0
## Additional context
I was already using basePath when it was "experimental" without any problem.
| https://github.com/vercel/next.js/issues/15747 | https://github.com/vercel/next.js/pull/16263 | aa7659d8078e3da30d634a8c2f88b6e9e1a5a198 | f8534a6e62a494663a91ca83893855827df649be | "2020-07-31T16:05:44Z" | javascript | "2020-08-17T15:25:36Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,737 | ["docs/basic-features/built-in-css-support.md"] | SASS support only work for scss files not for sass files | # Bug report
## Describe the bug
The SASS support of next-js only works for `*.scss` files not `*.sass` files.
## To Reproduce
Create a `*.sass` files in your code and import it in any page if its `*.module.sass` or in `_app.[js|tsx]` if it contain global styles i.e. `*.sass`. You will start getting an error when running the dev server.
```bash
SassError: Expected newline.
```
But if you change them to `scss` extension it starts working again. Although the CSS documentation states that any of the 2 extensions can be used it works only for `scss`.
## Expected behavior
It should work for both extensions.
## Screenshots
N/A
## System information
- OS: macOS,
- Browser (if applies) [e.g. chrome ]
- Version of Next.js: 9.4.4
- Version of Node.js: 12.x | https://github.com/vercel/next.js/issues/15737 | https://github.com/vercel/next.js/pull/15830 | 6ffc3f2a152c2310d92d5967f78e12e5ed316970 | e0d0c2ebb5c05237103f683982d78f78525b64fb | "2020-07-31T12:10:22Z" | javascript | "2020-08-04T03:50:46Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,725 | ["examples/with-react-intl/package.json"] | react-intl not working in WITH-REACT-INTL-APP example | # Bug report
Hi guys, When I run ` WITH-REACT-INTL-APP` and had issue:
`$ node server.js
(node:25154) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'concat' of undefined
at Object.webpack (/home/nghinv/work/with-react-intl-app/node_modules/next-transpile-modules/src/next-transpile-modules.js:102:73)
at getBaseWebpackConfig (/home/nghinv/work/with-react-intl-app/node_modules/next/dist/build/webpack-config.js:117:489)
at async Promise.all (index 0)
at async HotReloader.start (/home/nghinv/work/with-react-intl-app/node_modules/next/dist/server/hot-reloader.js:14:2171)
at async DevServer.prepare (/home/nghinv/work/with-react-intl-app/node_modules/next/dist/server/next-dev-server.js:11:378)
(node:25154) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:25154) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.`
Please help me! Thanks all guys!
| https://github.com/vercel/next.js/issues/15725 | https://github.com/vercel/next.js/pull/15730 | c9e379c3bf3c028900f0feb7876590cf85fdb199 | 1409cd6e3f098e720a713dcb963c8410b6897408 | "2020-07-31T03:56:27Z" | javascript | "2020-07-31T07:14:37Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,719 | ["docs/api-reference/next.config.js/basepath.md", "docs/api-reference/next.config.js/headers.md", "docs/api-reference/next.config.js/redirects.md", "docs/api-reference/next.config.js/rewrites.md", "docs/api-reference/next.config.js/trailing-slash.md"] | [Docs] Add upgrade note to features released in Next.js 9.5 | https://github.com/vercel/next.js/issues/15719 | https://github.com/vercel/next.js/pull/15703 | d97d045dfc7bbad53dfee8b092e1d95bcaf099f1 | 01662f1c79279a1710db5e3c8d2343a0c2f88320 | "2020-07-31T01:10:12Z" | javascript | "2020-07-31T03:40:40Z" |
|
closed | vercel/next.js | https://github.com/vercel/next.js | 15,712 | ["docs/api-reference/next.config.js/headers.md", "docs/api-reference/next.config.js/redirects.md", "docs/api-reference/next.config.js/rewrites.md"] | Regex Path Matching for Redirects | # Feature request
## Is your feature request related to a problem? Please describe.
A common URL pattern for blogs and websites coming from Wordpress is `/year/month/day/slug`. To redirect pages that match this to a different page, the path matching would look like this:
```javascript
{
source: '/:year/:month/:day/:post',
destination: '/blog/:post',
permanent: true,
},
```
This however matches generated Next.js files (for example, `/_next/static/css/b9c315e24bcc3c2b5b54.css` which results in effectively breaking the built website (dev mode doesn't match this pattern).
## Describe the solution you'd like
By adding more finegrained matchers like Regex strings, you could restrict the matching to look for numbers only. Using the example above, in the `vercel.json` file I can currently write `"\/\\d{4}\/\\d{2}\/\\d{2}\/(.+)\/?"` to only match blog posts.
## Describe alternatives you've considered
I can achieve this by leveraging platform-specific files such as `vercel.json` but it would be nice to have support for this out of the box!
| https://github.com/vercel/next.js/issues/15712 | https://github.com/vercel/next.js/pull/15714 | 9d68a363b6f3757ef8517fd1a303d97dc52378d2 | 766fef2271475bb2d7e9b9805d505f2dcee17656 | "2020-07-30T20:19:18Z" | javascript | "2020-07-30T21:15:29Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,711 | ["docs/advanced-features/dynamic-import.md", "examples/with-dynamic-import/package.json", "examples/with-dynamic-import/pages/index.js"] | [Docs] Improve the Dynamic imports page | From our docs:
> Next.js supports ES2020 dynamic import() for JavaScript. With it you can import JavaScript modules (inc. React Components) dynamically and work with them. They also work with SSR.
>
> You can think of dynamic imports as another way to split your code into manageable chunks.
The above is right, but the entire page only shows examples with `next/dynamic`, which can **only** be used for React Components, and you may end up thinking it's possible to use it with modules, in which case you'll need `import()` instead. We have to be more clear about the differences here. | https://github.com/vercel/next.js/issues/15711 | https://github.com/vercel/next.js/pull/16803 | a7a6aa54ef90c586dcc9274b7366c31873a552ad | b5cf3e4c940f2553f0db6a903363588c01c0c680 | "2020-07-30T19:12:04Z" | javascript | "2020-09-05T23:45:30Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,704 | ["errors/invalid-page-config.md", "packages/next/build/babel/plugins/next-page-config.ts", "test/integration/amphtml/pages/nav.js", "test/integration/amphtml/pages/var-before-export.js", "test/integration/amphtml/test/index.test.js", "test/integration/page-config/pages/invalid/export-from.js", "test/integration/page-config/pages/invalid/import-export.js", "test/integration/page-config/pages/invalid/spread-config.js", "test/integration/page-config/test/index.test.js"] | Links from non-AMP pages to AMP pages causes broken pages | # Bug report
## Describe the bug
So, the problem I reported in https://github.com/vercel/next.js/issues/11521 has essentially resurfaced again.
## To Reproduce
Clone https://github.com/kevva/next-app-issue and do the following:
1. Run `npm run dev`
2. Click on the "Test" link and then on the "Home" link again
3. The image on the start page is gone (notice that it tries to load the bundle for the page) | https://github.com/vercel/next.js/issues/15704 | https://github.com/vercel/next.js/pull/16211 | f8534a6e62a494663a91ca83893855827df649be | aa4b87e357f1881834ba93b2f33ba2a91e49ecce | "2020-07-30T18:25:25Z" | javascript | "2020-08-17T17:24:18Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,662 | ["packages/next/server/hot-reloader.ts", "packages/react-dev-overlay/src/middleware.ts", "test/integration/broken-webpack-plugin/next.config.js", "test/integration/broken-webpack-plugin/pages/index.js", "test/integration/broken-webpack-plugin/test/index.test.js"] | Broken webpack plugins hang the dev server indefinitely | # Bug report
## Describe the bug
When a webpack build uses a broken plugin, the dev requests hang indefinitely and never complete.
This means the user doesn't see the error and thinks that Next.js itself is broken.
Reported here: https://twitter.com/fr3fou/status/1288633068387999746
| https://github.com/vercel/next.js/issues/15662 | https://github.com/vercel/next.js/pull/15659 | 6b0c4948f08ccb42efa152c61cea0fdd9502f38b | cac35c389a18236b815dbc44e1e8a75792e215db | "2020-07-30T01:58:33Z" | javascript | "2020-07-30T03:44:25Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,657 | ["packages/react-dev-overlay/src/internal/container/Errors.tsx", "test/acceptance/ReactRefreshLogBox.test.js", "test/acceptance/helpers.js", "test/integration/error-is-clickable/pages/first.js", "test/integration/error-is-clickable/test/index.test.js"] | Move redbox tests from integration to acceptance suite | See test suite added in #15617 | https://github.com/vercel/next.js/issues/15657 | https://github.com/vercel/next.js/pull/15658 | 59924967f1947a510884f2a65ade89c832c4f84e | 8f914a3bcbfbd15e874ef657242cd19ad7b88536 | "2020-07-29T23:31:03Z" | javascript | "2020-07-30T00:58:36Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,655 | [".github/workflows/build_test_deploy.yml", "packages/next/build/webpack-config.ts", "packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts"] | [canary only] Next.js canary fails to launch with webpack 5 beta enabled | # Bug report
`next@canary` currently cannot boot with `webpack@5` beta enabled. 9.5.0 works fine.
We need to add a test to prevent us from regressing, and fix the bug.
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. `cat package.json | jq '.resolutions.webpack = "^5.0.0-beta.22"' | sponge package.json`
2. `yarn`
3. `yarn next dev`
4. See error
| https://github.com/vercel/next.js/issues/15655 | https://github.com/vercel/next.js/pull/15645 | 3b4d460afd8bcb6437dca1456be2ad178722d9bb | 3d98171daba775c85a036b3669c1ec603ff60ded | "2020-07-29T22:50:18Z" | javascript | "2020-07-29T23:19:32Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,626 | ["packages/next/build/webpack/loaders/next-serverless-loader.ts", "packages/next/next-server/lib/router/utils/prepare-destination.ts", "test/integration/custom-routes/test/index.test.js", "test/integration/prerender/test/index.test.js"] | Rewrite adds query param when re-appending a matched path param to the destination | # Bug report
## Describe the bug
A rewrite from `/source/:route*` to `http://my-api-server.example.org/destination/:route*` forwards a request sent to `/source/foo` to `http://my-api-server.example.org/destination/foo?route=foo`. The extra query param will lead to issues especially with API servers as in REST this might represent a filter criteria.
## To Reproduce
1. Create a new next app
2. Create a custom next.config.js:
```js
module.exports = {
async rewrites() {
return [
{
source: "/api/:route*",
destination: "https://postman-echo.com/:route*",
},
];
},
};
```
3. Start next: `yarn next dev`
4. Open up `http://localhost:3000/api/get`
5. The results includes `"url":"https://postman-echo.com/get?route=get"`
## Expected behavior
Params that are added to the destination path should not be included as a query param.
5. The results includes `"url":"https://postman-echo.com/get"`
## Screenshots
n/a
## System information
- Version of Next.js: 9.5.0
- Version of Node.js: n/a
## Additional context
n/a
| https://github.com/vercel/next.js/issues/15626 | https://github.com/vercel/next.js/pull/16189 | 746000ea5e55c12763defe01028d03ae765eda67 | 1b4d463cc8037be7725f8a2bb8e2b32bd1600f96 | "2020-07-29T10:55:09Z" | javascript | "2020-08-14T18:51:58Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,599 | ["packages/react-dev-overlay/src/internal/container/Errors.tsx", "test/integration/error-is-clickable/pages/first.js", "test/integration/error-is-clickable/test/index.test.js"] | Error overlay incorrectly formats message with embedded links | 
There is no space after the anchor component. | https://github.com/vercel/next.js/issues/15599 | https://github.com/vercel/next.js/pull/15617 | 3d98171daba775c85a036b3669c1ec603ff60ded | c1e5b66cd7211e7fc351769b91ab93a60a90eeec | "2020-07-28T20:38:30Z" | javascript | "2020-07-29T23:30:18Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,579 | ["packages/next/build/webpack/loaders/next-serverless-loader.ts", "packages/next/next-server/server/api-utils.ts", "test/integration/basepath/server.js", "test/integration/dynamic-optional-routing/pages/[[...optionalName]].js", "test/integration/dynamic-optional-routing/pages/nested/[[...optionalName]].js", "test/integration/dynamic-optional-routing/server.js", "test/integration/dynamic-optional-routing/test/index.test.js"] | [9.5] optional catch all routes req.query.params behavior is different when deployed on vercel (works in dev, works in 9.4.4) | # Bug report
## Describe the bug
Hi, just tried to upgrade from 9.4.4 to 9.5.0. I was previously using the experimental `optionalCatchAll` flag. On 9.5.0 my optional catch-all routes are working in dev mode (next dev) but no more working when deployed on Vercel.
The issue is that req.query.params value is different between Vercel and dev mode when using optional catch-all routes.
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Given a project structure of:
```
- project
- api/
- api/organizations/
- api/organizations/[organizationId]
- api/organizations/[organizationId]/teams/
- api/organizations/[organizationId]/teams/[[...params]].js
```
When calling `https://example.com/organizations/200/teams` on vercel (9.5.0):
- `req.query.params` value: `[""]`
When calling `https://localhost/organizations/200/teams` on `next dev` (9.5.0):
- `req.query.params` value: `undefined`
When calling `https://example.com/organizations/200/teams` on vercel (9.4.4):
- req.query.params value: `undefined`
When calling `https://localhost/organizations/200/teams` on `next dev` (9.4.4):
- req.query.params value: `undefined`
## Expected behavior
Both vercel and `next dev` should send the same value for req.query.params, maybe sticking to `undefined` or anything else that makes sense given current APIs.
## System information
- OS: macOS
- Version of Next.js: 9.5.0
- Version of Node.js: 12.8.3
## Additional context
n/a
| https://github.com/vercel/next.js/issues/15579 | https://github.com/vercel/next.js/pull/15593 | 3ffef602802997911a0827af625e56acbb3ff20c | dd6a08980af8e99bdc4a99d403bebe2946bca05d | "2020-07-28T14:23:00Z" | javascript | "2020-07-29T14:19:25Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,552 | ["examples/with-i18n-rosetta/next.config.js"] | Update examples using new routing properties | We need to update any examples using `experimental` rewrites / redirects!
edit: fix up in https://github.com/vercel/next.js/pull/15554 | https://github.com/vercel/next.js/issues/15552 | https://github.com/vercel/next.js/pull/15554 | 4dcf94e5c4325669253cc5e67141aaf03a13ee1e | 5b4274a5901134035e4d041b7dd1680f87286ff9 | "2020-07-28T05:19:01Z" | javascript | "2020-07-28T08:36:34Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,550 | ["examples/with-apollo-and-redux/pages/apollo.js", "examples/with-apollo-and-redux/pages/index.js", "examples/with-apollo-and-redux/pages/redux.js", "examples/with-graphql-hooks/pages/index.js"] | Update `unstable_revalidate` in examples to be the new field name | We need to update examples to no longer use `unstable_revalidate` and use `revalidate` instead. | https://github.com/vercel/next.js/issues/15550 | https://github.com/vercel/next.js/pull/15551 | bf9b96bd81d62d8fe62487ef58509dd958d76bcb | e73faa187bfe2bccabbb52f05ea5faf4ad3a85fe | "2020-07-28T05:14:50Z" | javascript | "2020-07-28T05:25:50Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,527 | ["errors/gssp-export.md"] | Update gssp-export error message to be more clear | In regards to this tweet thread:
https://twitter.com/timer150/status/1287795608644980738 | https://github.com/vercel/next.js/issues/15527 | https://github.com/vercel/next.js/pull/15529 | 56367487085e3bef0bf86eebc1ebe662bf4b2337 | 63e66ef0b052d366a20052b929e3fa01c93e6368 | "2020-07-27T17:05:07Z" | javascript | "2020-07-27T18:47:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,510 | ["packages/react-dev-overlay/package.json"] | Peer dep warning on `9.4.5-canary.43` | # Bug report
## Describe the bug
```
warning "next > @next/[email protected]" has incorrect peer dependency "webpack@^4|^5".
```
## To Reproduce
1. `yarn add next`
## Expected behavior
No warnings should be printed. | https://github.com/vercel/next.js/issues/15510 | https://github.com/vercel/next.js/pull/15511 | 3accce37a7486b51b43a45908697876f01f7a1ca | ac12c07ce55f5d1566be43b884818ec9387eabee | "2020-07-27T04:41:55Z" | javascript | "2020-07-27T05:58:36Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,509 | ["docs/basic-features/data-fetching.md"] | Docs about incremental static regeneration | We need to add documentation for the new ISR feature (`revalidate` property) for the `getStaticProps` lifecycle. | https://github.com/vercel/next.js/issues/15509 | https://github.com/vercel/next.js/pull/15663 | 8f914a3bcbfbd15e874ef657242cd19ad7b88536 | 925384c1cf150201aa4b7a47dd7edce77d411ef3 | "2020-07-27T04:36:35Z" | javascript | "2020-07-30T02:35:25Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,484 | ["examples/with-redux-persist/pages/_app.js"] | [Examples] Problem with query parameters in with-redux-persist | # Bug report
## Describe the bug
In the [with-redux-persist](https://github.com/vercel/next.js/tree/canary/examples/with-redux-persist) example, using a query parameter in the URL seems to break the loading functionality.
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. [Clone the repo](https://github.com/vercel/next.js/tree/canary/examples/with-redux-persist)
2. Change the loading component to a simple string, as such:
```
<PersistGate loading={<div>Loading</div>} persistor={persistor}>
```
3. Run `yarn dev` and navigate to `http://localhost:3000/?test=123`
4. Page is stuck on loading
## Expected behavior
It should work the same way it does without the query parameter, meaning the page should load properly like it does http://localhost:3000/
## System information
- OS X
- Chrome 84
| https://github.com/vercel/next.js/issues/15484 | https://github.com/vercel/next.js/pull/16085 | 9e4bb5a1299360042cb9170b5717be5657b75df3 | aa568a549ebe10ac6748a8c77010a06c3b81ff93 | "2020-07-26T01:08:54Z" | javascript | "2020-09-01T23:48:56Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,482 | ["packages/next/next-server/lib/router/router.ts", "test/integration/client-navigation/test/index.test.js"] | Error on Router.back() after at least two window.history.pushState() | # Bug report
## Describe the bug
A clear and concise description of what the bug is.
When you do `window.history.pushState` at least twice successively on the same page and then `Router.back`, there is an error: `TypeError: Cannot read property 'indexOf' of undefined`
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. Create a next app: `yarn create next-app`
2. Start the dev server: `yarn dev`
3. On the home page, import `Router` and add the following two buttons:
```
<button onClick={() => Router.back()}>back</button>
<button
onClick={() => {
const state = { ts: Date.now() };
const title = '';
const url = '';
window.history.pushState(state, title, url);
}}
>
push
</button>
```
4. In the browser, go to the home page, click at least twice on the push button, then click on the back button.
5. You'll see an error: **Unhandled Runtime Error
TypeError: Cannot read property 'indexOf' of undefined**
Note that the same error happens with `window.history.back()`
## Expected behavior
Expected to go back in history without error.
## System information
- OS: WSL on Windows 10
- Browser: Chrome
- Version of Next.js: 9.4.4
- Version of Node.js: 12.16.3
| https://github.com/vercel/next.js/issues/15482 | https://github.com/vercel/next.js/pull/15379 | 17420c785c23e56b82a7fd80490559a292db1c8d | 91242ca6d7d8227dff9d2eb7e9c3b8517f5b6fde | "2020-07-25T23:00:53Z" | javascript | "2020-07-28T10:02:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,468 | ["packages/next/package.json", "test/integration/css-customization/test/index.test.js", "test/integration/css-features/test/index.test.js", "test/integration/css-fixtures/next-issue-15468/pages/_app.js", "test/integration/css-fixtures/next-issue-15468/pages/index.js", "test/integration/css-fixtures/next-issue-15468/styles/global.css", "test/integration/css/test/index.test.js", "test/integration/scss/test/index.test.js", "yarn.lock"] | [canary] CSS ordering changed sometime after canary.21 | @paco reported this:

| https://github.com/vercel/next.js/issues/15468 | https://github.com/vercel/next.js/pull/15488 | f98e38c9b634b85e6679e7b5f953a9d98074cfc3 | e837c2253db07124ccc5c8cd79070d3c05fba824 | "2020-07-25T02:04:49Z" | javascript | "2020-07-27T03:56:36Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,388 | ["packages/next/cli/next-dev.ts", "packages/next/cli/next-export.ts", "packages/next/cli/next-start.ts", "packages/next/cli/next-telemetry.ts", "test/integration/build-warnings/test/index.test.js", "test/integration/cli/test/index.test.js"] | UnhandledPromiseRejectionWarning when unknown flag provided for cli commands | # Bug report
## Describe the bug
While using next CLI commands, if an incorrect flag is provided then `UnhandledPromiseRejectionWarning` is thrown
While fixing this issue for the `next build` command @timneutkens pointed out that the other cli commands might have the same issue https://github.com/vercel/next.js/pull/15049#issuecomment-657259169 and when i investigated the same problem exists for `start, export, dev and telemetry` commands too
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. `yarn create next-app example`
2. Select `Default Starter App`
3. `cd example`
4. `yarn next dev --randomflag`
5. `yarn next export --randomflag`
6. `yarn next start --randomflag`
6. `yarn next telemetry --randomflag`
## Expected behavior
Should throw show an error stating invalid/unrecognized flag is being used
## Screenshots

## System information
- OS: macOS
- Version of Next.js: v9.4.4 / canary
- Version of Node.js: v14.4.0 | https://github.com/vercel/next.js/issues/15388 | https://github.com/vercel/next.js/pull/15422 | 91242ca6d7d8227dff9d2eb7e9c3b8517f5b6fde | 27c207da7b199cbaad6c7340b72323f7501e8879 | "2020-07-22T05:03:48Z" | javascript | "2020-07-28T10:12:57Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,383 | ["packages/next/next-server/server/next-server.ts", "test/integration/prerender/test/index.test.js"] | Generating static pages even with no paths and fallback:false | # Bug report
## Describe the bug
I have a simple blog app:
* Shows a list of posts in the homepage
* Then when clicked it shows the blog post
I have configured the `getStaticPaths` of the post page with following:
```js
export async function getStaticPaths () {
return {
paths: [],
fallback: false
}
}
```
Due to above, I expect to get 404 for blog posts. But they do give me correct static pages.
## To Reproduce
* Use this repo: https://github.com/arunoda/fallback-false-nextjs-demo
* `yarn build & yarn start`
* Visit home page
* Click a post
* Reload the post
* You can see that
## Expected behavior
The blog post should give us 404.
## Demo Video
https://www.youtube.com/watch?v=XqSqTwBa-N0
## System information
- OS: macOS
- Browser: Chrome
- Version of Next.js: canary (same behavior even with latest)
- Version of Node.js: [e.g. 12.x.x]
| https://github.com/vercel/next.js/issues/15383 | https://github.com/vercel/next.js/pull/16401 | fc98c13a2e6bc545073de0eedbe045352b387f6d | ec7009620abe5429b199cf1b39700e38497917b7 | "2020-07-21T21:00:53Z" | javascript | "2020-08-20T17:59:03Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,342 | ["packages/react-refresh-utils/package.json"] | Next.js canary install emits warnings | Running `yarn add next@canary` emits the following warnings:
```
warning "next > @next/[email protected]" has incorrect peer dependency "webpack@^4|^5".
warning "next > @next/[email protected]" has incorrect peer dependency "webpack@^4|^5".
``` | https://github.com/vercel/next.js/issues/15342 | https://github.com/vercel/next.js/pull/15375 | fcfbceaa7e80be4adaa70f9bafa66656a4f99a9e | 4898d24f9a370b73e298749aaa3b2b64315cf04d | "2020-07-20T19:20:39Z" | javascript | "2020-07-21T17:33:25Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,330 | ["docs/api-reference/next.config.js/trailing-slash.md", "packages/next/build/webpack-config.ts", "packages/next/lib/load-custom-routes.ts", "packages/next/next-server/server/config.ts", "test/integration/trailing-slashes/next.config.js", "test/integration/trailing-slashes/test/index.test.js"] | Stabilize new trailing slash API | The new trailing slash API needs to be moved from the experimental options to the stable level. | https://github.com/vercel/next.js/issues/15330 | https://github.com/vercel/next.js/pull/15331 | 047b73b824134037b32cb076f014357ce8de8c9c | a11d99390a02c2ced21a7de464e005f8eb5b06d4 | "2020-07-20T15:29:13Z" | javascript | "2020-07-20T16:16:59Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,321 | ["examples/with-react-md/README.md"] | /examples/with-react-md | # Bug report
## Describe the bug
/examples/with-react-md
https://github.com/vercel/next.js/tree/canary/examples/with-react-md
This part of the link
"This example features how you use react-md (React Material Design) with Next.js."
The URL has changed?
https://react-md.mlaursen.com/
I can't access this site.
↓
https://react-md.dev/
Did the URL move?
## To Reproduce
Click the link.
## Expected behavior
https://react-md.mlaursen.com/
Change the link.
↓
https://react-md.dev/
or etc.
## Screenshots
If applicable, add screenshots to help explain your problem.
## System information
- OS: [Windows]
- Browser (if applies) [chrome]
| https://github.com/vercel/next.js/issues/15321 | https://github.com/vercel/next.js/pull/15325 | 42014a49af7533dbc8b0e9ee0fef4ca908a08da1 | 8f888c9f906bb17f608a9c510831e0140ec5cdf6 | "2020-07-20T11:33:05Z" | javascript | "2020-07-20T13:36:23Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,301 | [".github/workflows/build_test_deploy.yml"] | Run production, basic, and Fast Refresh test suite on macOS | We should extend our GitHub action configuration to run macOS tests on the Basic, Production, and Acceptance (Fast Refresh) suites. This would've given us early indication of the chokidar watching bug we identified on macOS. | https://github.com/vercel/next.js/issues/15301 | https://github.com/vercel/next.js/pull/15366 | 0eff1be77a8c7dd5f1badaba4d6a745eb9e124b0 | 7a266a914ea7a3e9806a7b634a78979831a27864 | "2020-07-19T07:39:50Z" | javascript | "2020-07-21T15:50:49Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,281 | ["packages/next/build/index.ts", "packages/next/cli/next-build.ts", "test/integration/custom-routes/test/index.test.js"] | Clean up `next build` output | # Feature request
Next.js emits a lot of information on build, including all redirects, rewrites, and headers. This can be quite overwhelming even though the information is unnecessary most of the time.
## Describe the solution you'd like
We should hide all but necessary information behind a `--verbose` or `-v` flag sent to the `next build` command for troubleshooting.
## Describe alternatives you've considered
Maybe `-d` / `--debug` to match the Vercel CLI since `-v` can be used for version. | https://github.com/vercel/next.js/issues/15281 | https://github.com/vercel/next.js/pull/16399 | c210154a2828829110d5df8e32ad57bf790eb539 | 3dec50001e34894379e0b14ef9bad9379c44d7b7 | "2020-07-17T22:01:31Z" | javascript | "2020-08-20T15:43:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,278 | [".gitignore", "packages/next/build/webpack-config.ts"] | next dev constantly errors when using emacs, failing to load emacs lock files | # Bug report
When using `next dev` with emacs, as you develop, emacs creates symbolic link files starting with `.#` as lock files. Next.js seems to attempt to load these but fails, spewing out errors constantly.
## To Reproduce
1. Run `next dev`
2. Develop your `.js` files using emacs
3. Observe errors like:
```
(node:13646) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/home/lacker/twitroid/pages/.#app.js'
(node:13646) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:13646) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```
## Expected behavior
I expected to not get these errors
## System information
- OS: Ubuntu 18
- Version of Next.js: 9.4.4
- Version of Node.js: 10.21.0
## Additional context
I tried adding a webpack ignore filter to ignore these files, but it did not have any effect. | https://github.com/vercel/next.js/issues/15278 | https://github.com/vercel/next.js/pull/20497 | 3140e40db7c4c24ceb189779242e14b1d2b09caf | f2f9090a50f42bb894fc7ea3db48e1b125ea85fa | "2020-07-17T19:33:16Z" | javascript | "2020-12-29T16:12:36Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,275 | ["packages/next/lib/typescript/writeConfigurationDefaults.ts", "test/integration/tsconfig-verifier/pages/index.tsx", "test/integration/tsconfig-verifier/test/index.test.js", "test/integration/tsconfig-verifier/value.ts"] | Next.js should allow `module: 'commonjs'` in `tsconfig.json` | # Feature request
Next.js should allow a user to set `module: 'commonjs'` in their `tsconfig.json` instead of forcing it to be `esnext`.
This simplifies the setup of custom TypeScript servers or utilities that need to run in Node.js and would require a `tsconfig.server.json` otherwise.
## Describe the solution you'd like
```json
{ "compilerOptions": { "esModuleInterop": false, "module": "commonjs" } }
```
This should not be overwrote to `module: 'esnext'`.
## Additional context
Twitter feedback:
https://twitter.com/timer150/status/1284185357320429569 | https://github.com/vercel/next.js/issues/15275 | https://github.com/vercel/next.js/pull/15276 | 4d944a2bfbf96e448dfdf583a37585658989e7e9 | f5b186cb69039c354c6f02c76d5712dbf1170f71 | "2020-07-17T19:01:30Z" | javascript | "2020-07-18T19:37:13Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,261 | ["packages/next/build/webpack-config.ts", "test/integration/webpack-config-mainjs/client/polyfills.js", "test/integration/webpack-config-mainjs/next.config.js", "test/integration/webpack-config-mainjs/pages/static.js", "test/integration/webpack-config-mainjs/test/index.test.js"] | Canary 9.4.5-canary.36 => 9.4.5-canary.37 - can't resolve main.js | # Bug report
Sorry @timneutkens @Timer don't have time this morning for full-repro - but figured you'd want to know.
Getting this just on simple build run between 36 => 37 canary
Wild guess - but could it be related to here? https://github.com/vercel/next.js/pull/15224/files#diff-4ec59a55144129a45f46da71c0777df9
```js
ModuleNotFoundError: Module not found: Error: Can't resolve 'main.js' in '/vercel/419420aa'
```
## Describe the bug
Application won't build between the two versions
| https://github.com/vercel/next.js/issues/15261 | https://github.com/vercel/next.js/pull/15311 | 548ca82041c942113c3c0791210096cac5d63856 | aa62fa7f42971b1c772328b43aeca0233686ada2 | "2020-07-17T13:26:30Z" | javascript | "2020-07-20T02:16:50Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,256 | ["packages/next/next-server/lib/router/router.ts", "test/integration/client-navigation/test/index.test.js"] | Error "Cannon read property '_h' of undefined" when goind back in browser history | # Bug report
## Describe the bug
Error after navigating to previous page in react-router environment. My website have public part with next/router navigation, and private part with react-router based on catch-all feature. I am having an error when returning to a previous page in browser history. Interesting moment: it happens if i click in react-router **Link** component, and then try to go back 1 or 2 times. Error
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. Add "Catch-all" route
2. Use React-router in "Catch-all page"
3. Navigate to inner page in react-router by clicking on Link from react-router
4. Click to "Back" button in browser few times
5. Catch an error _Cannon read property '_h' of undefined_
## Expected behavior
No error is expected
## Screenshots

## System information
- OS: macOS
- Browser: Opera 68
- Version of Next.js: canary.36
- Version of Node.js: 12.14.1
## Additional context
Error come from fix at canary.36 described here: https://github.com/vercel/next.js/discussions/13010
| https://github.com/vercel/next.js/issues/15256 | https://github.com/vercel/next.js/pull/15379 | 17420c785c23e56b82a7fd80490559a292db1c8d | 91242ca6d7d8227dff9d2eb7e9c3b8517f5b6fde | "2020-07-17T10:17:15Z" | javascript | "2020-07-28T10:02:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,253 | ["packages/next/lib/load-custom-routes.ts", "test/integration/trailing-slashes/test/index.test.js"] | Canary trailingSlash experimental feature first level paths | # Bug report
## Describe the bug
Adding the trailingSlash feature causes first level paths to crash when deployed to Vercel. Deeper levels of paths works perfectly fine.
## To Reproduce
1. enable` trailingSlash: true`
2. Go to localhost:3000/firstlevel
3. You will be redirected to https://firstlevel/
4. It strips the entire host from the url
## Expected behavior
Should redirect to https://localhost:3000/firstlevel/
## System information
- OS: macOS
- Browser (if applies) Chrome
- Version of Next.js: 9.4.5-canary.36
- Version of Node.js: v12.14.0
| https://github.com/vercel/next.js/issues/15253 | https://github.com/vercel/next.js/pull/15335 | c40f407d82258951b08525ae173444bc203d93ba | d5c1addd645306b79d5031543581c6123c25d0b7 | "2020-07-17T09:14:17Z" | javascript | "2020-07-20T18:24:43Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,244 | ["packages/next/next-server/server/config.ts", "test/integration/basepath/pages/amp-hybrid.js", "test/integration/basepath/test/index.test.js"] | Respect basePath in amphtml link rel | When using basePath in next config amphtml link rel doesn't respect basePath.
Note that this might be already fixed since i'm using experimental basePath in latest release (9.4.4) | https://github.com/vercel/next.js/issues/15244 | https://github.com/vercel/next.js/pull/15949 | d8edb2eaa52ace39c5ea2ea147d5f0095cc9bffe | 4b6e9a45a376215758eedaa1877c6155ec239049 | "2020-07-17T01:21:03Z" | javascript | "2020-08-08T13:15:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,233 | ["test/integration/link-with-encoding/pages/index.js", "test/integration/link-with-encoding/pages/query.js", "test/integration/link-with-encoding/test/index.test.js"] | next/link will replace urls in query with "null" | # Bug report
## Describe the bug
When using the `next/link` component, passing an href with a url in the query string (for example `/pathname?id=http://example.com`) will replace `http://` with null (`/pathname?id=nullexample.com`).
## To Reproduce
Create the following link
```typescript
import Link from "next/link"
const ExampleComponent: React.FunctionComponent = () => {
return (
<Link href="/pathname?id=http://example.com">
<a>See info on example.com!</a>
</Link>
)
}
export default ExampleComponent
```
When you click on the link, it will navigate to `https://mysite.com/pathname?id=nullexample.com`
## Expected behavior
The above code will navigate to `https://mysite.com/pathname?id=http://example.com`
## System information
- OS: macOS 10.15.5
- Browser (if applies) Firefox
- Version of Next.js: 9.4.4
- Version of Node.js: v14.4.0
| https://github.com/vercel/next.js/issues/15233 | https://github.com/vercel/next.js/pull/15238 | bd9fc12f92915067e441b221a3652542687a7569 | e56a6add8de788baa6bee2865c469e6f7bdc1fb9 | "2020-07-16T18:21:28Z" | javascript | "2020-07-16T22:47:46Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,229 | ["docs/api-routes/dynamic-api-routes.md", "docs/routing/dynamic-routes.md"] | [Docs] Explain the difference between optional catch all routes and catch all routes | Our docs on catch all routes say the following:
> Catch all routes can be made optional by including the parameter in double brackets ([[...slug]]).
>
>For example, pages/post/[[...slug]].js will match /post, /post/a, /post/a/b, and so on.
Which is very similar to what catch all routes already does, with the difference that it now includes the `/post` example, which is the only difference, but we aren't clear on that.
Todo: update the section to be clear about the difference so you don't have to figure it out yourself. | https://github.com/vercel/next.js/issues/15229 | https://github.com/vercel/next.js/pull/15290 | 4a136476e75a9f6e40f3fa59abd65a6735f9389b | 3bfc25db9fc6fb21875510d5d9ada9896b87a80c | "2020-07-16T16:29:44Z" | javascript | "2020-07-18T20:13:47Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,219 | ["examples/with-graphql-faunadb/README.md"] | Broken Demo: FaunaDB Graphql Example | # Bug report
The `live demo` for example is broken: https://github.com/vercel/next.js/tree/canary/examples/with-graphql-faunadb
## To Reproduce
Visit: https://with-graphql-faunadb.now.sh/
Site returns 403
## Expected behavior
Functioning faunadb demo.
## Screenshots

| https://github.com/vercel/next.js/issues/15219 | https://github.com/vercel/next.js/pull/15267 | 279da6317c95c6e3c03bb15d516ff062f01d6ae4 | a475480745b66bad6ffbefbb4ca7fd9eb1e9b998 | "2020-07-16T11:29:22Z" | javascript | "2020-07-17T16:44:32Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,194 | ["packages/next/client/normalize-trailing-slash.ts", "packages/next/next-server/lib/router/router.ts", "test/integration/trailing-slashes/next.config.js", "test/integration/trailing-slashes/test/index.test.js", "test/lib/next-test-utils.js"] | Investigate edge-case with `basePath` and `trailingSlash: true`: | Something wrong going on when using `basePath` and `trailingSlash: true`:
Next/Link removes trailing slash when going to "/"
And in some old browsers got error (which was not in `9.4.5-canary.27`)
```
Unhandled promise rejection,TypeError: t.entries is not a function
/_next/static/runtime/polyfills-35e39b6a0bf08dcb376c.js
```
Using `9.4.5-canary.34`
_Originally posted by @Unsfer in https://github.com/vercel/next.js/issues/15148#issuecomment-658731907_ | https://github.com/vercel/next.js/issues/15194 | https://github.com/vercel/next.js/pull/15200 | 1fe612e8826d2e5d60f252815ed9952a7916478b | 54d991e6420d5493242a933037a8192ade0b53b8 | "2020-07-15T16:50:53Z" | javascript | "2020-07-15T23:53:31Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,188 | ["packages/next/next-server/lib/router/router.ts", "test/integration/absolute-assetprefix/next.config.js", "test/integration/absolute-assetprefix/pages/about.js", "test/integration/absolute-assetprefix/pages/index.js", "test/integration/absolute-assetprefix/test/index.test.js"] | Routing error on canary when using asset prefix | # Bug report
## Describe the bug
See https://github.com/vercel/next.js/pull/14827#discussion_r454992627
Happens when an absolute `assetPath` is configured and on links to pages that have `getStaticProps` | https://github.com/vercel/next.js/issues/15188 | https://github.com/vercel/next.js/pull/15287 | 4422be32761f346a598ae688dc5971378a9f582e | 381e44f324095d154e0244ce67b6a7403792dd29 | "2020-07-15T14:15:14Z" | javascript | "2020-07-19T04:02:01Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,093 | ["examples/custom-server-hapi/next-wrapper.js", "examples/custom-server-hapi/pages/index.js", "examples/custom-server-hapi/public/logo.svg", "examples/custom-server-hapi/server.js"] | Hapi example doesn't handle static files in /public | Hi,
The latest versions of NextJS uses the public directory to serve static files, and we can access those static files directly in the root URL. However, it used to be different (with the static directory).
The example for running a custom server with HapiJS is not working anymore and need an update. I haven't yet found the solution, otherwise I would have shared it, but hopefully that will be fixed :)
Thanks a lot. | https://github.com/vercel/next.js/issues/15093 | https://github.com/vercel/next.js/pull/15292 | 7a266a914ea7a3e9806a7b634a78979831a27864 | ef637b38cb9660e0d5f289d39e1820613d01d6d0 | "2020-07-12T08:13:37Z" | javascript | "2020-07-21T17:27:39Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,033 | ["examples/with-iron-session/package.json"] | with-iron-session example fetch function is not defined | # Bug report
## Describe the bug
I was trying the `with-iron-session` example from the canary branch, I remember a couple days ago it was working as expected, today I tried it again but now I was getting the following error:
Response:
```
{"message":"fetch is not defined"}
```
Error:
```
index.js:1 An unexpected error happened: Error: Internal Server Error
at fetcher$ (fetchJson.js:15)
at tryCatch (runtime.js:45)
at Generator.invoke [as _invoke] (runtime.js:274)
at Generator.prototype.<computed> [as next] (runtime.js:97)
at tryCatch (runtime.js:45)
at invoke (runtime.js:135)
at runtime.js:145
```
I also then installed `"isomorphic-unfetch": "^3.0.0",` and imported the `fetch` function where it's required and the example worked again as expected.
I already removed the whole example and re-installed again but that didn't fix it.
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. Go to the examples in the canary branch and install `with-iron-session`
2. Run the local server
3. Try to login to fetch your GitHub user, you'll get the error
4. Install `"isomorphic-unfetch": "^3.0.0",` and import it in `lib/fetchJson.js`
5. Now try to login again and the fetch function will work.
## Expected behavior
The `fetch` function from the example to work.
## System information
- OS: Windows 10
- Browser: Version 83.0.4103.116 (Official Build) (64-bit)
- Version of Next.js: 9.3.6
- Version of Node.js: v12.16.3
| https://github.com/vercel/next.js/issues/15033 | https://github.com/vercel/next.js/pull/15065 | 2d9d649d492b77adeddea0242ab6b7fe73d18079 | 164896503cd5667309647972646b583111f64f54 | "2020-07-09T23:23:03Z" | javascript | "2020-07-12T19:24:52Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,026 | ["packages/next/package.json", "test/integration/css-fixtures/compilation-and-prefixing/styles/global.css", "test/integration/css/test/index.test.js", "yarn.lock"] | Build fails when using CSS grid-column shorthand syntax | # Bug report
## Describe the bug
`next build` fails with error:
```
f.charCodeAt is not a function
```
if any of the CSS contains the following valid rule:
```
grid-column: span 2;
```
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. Add offending style to any css file (global or module).
2. Run `next build`
4. See error
## Expected behavior
Builds successfully.
## System information
- OS: macOS Catalina 10.15.5
- Version of Next.js: 9.4.5-canary.30
- Version of Node.js: 12.16.1
## Additional context
This was working up to `[email protected]`. The version after replaced an import of `cssnano-simple` from a local version to a npm published version. I have added additional details as an issue on that repository: https://github.com/Timer/cssnano-preset-simple/issues/6 | https://github.com/vercel/next.js/issues/15026 | https://github.com/vercel/next.js/pull/15848 | e0d0c2ebb5c05237103f683982d78f78525b64fb | 48ca2f2cc5a76caf30a08d32469993cd7a7ca5b6 | "2020-07-09T19:30:26Z" | javascript | "2020-08-04T04:08:09Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 15,023 | ["packages/next/next-server/server/render.tsx", "test/integration/dynamic-routing/pages/index.js", "test/integration/dynamic-routing/test/index.test.js", "yarn.lock"] | useRouter has inconsistent results depending on getInitialProps | # Bug report
## Describe the bug
Using a query url flag to change layout render options; it should function without having to use getInitialProps.
## To Reproduce
https://codesandbox.io/s/goofy-williams-ru4nv
Append to base URL in the sandbox demo: `/test?inapp=1`
- In _app.jsx make sure getInitialProps is commented out.
- AppStateProvider logs a message and the content of message will be
```javascript
{
route: '/[locale]',
pathname: '/[locale]',
query: { amp: undefined },
asPath: '/[locale]',
basePath: '',
events: undefined,
isFallback: false
}
```
- Uncomment getInitialProps in _app.tsx
- AppStateProvider logs a message and the content of message will be
```javascript
{
route: '/[locale]',
pathname: '/[locale]',
query: { inapp: '1', locale: 'test' },
asPath: '/test?inapp=1',
basePath: '',
events: undefined,
isFallback: false
}
```
inapp is used to set a global per session flag of whether or not to choose a different layout.
## Expected behavior
query and asPath should be availble with/without getInitialProps
## System information
- Latest of all packages in codesandbox | https://github.com/vercel/next.js/issues/15023 | https://github.com/vercel/next.js/pull/15037 | f4f6fea71f761f4069dc5ae3dcbf0c725cb8aad3 | fed7e093f5c7c8bb3ef338a84fc13a46737926f8 | "2020-07-09T18:04:58Z" | javascript | "2020-07-10T03:16:02Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,964 | ["packages/next/build/index.ts", "test/integration/dynamic-optional-routing-root-static-paths/next.config.js", "test/integration/dynamic-optional-routing-root-static-paths/pages/[[...optionalName]].js", "test/integration/dynamic-optional-routing-root-static-paths/test/index.test.js"] | Optional catchAll route with getStaticProps breaks builds, but not the dev server | # Bug report
## Describe the bug
I'm trying to build dynamic nested SSG routes with Next. The goal is to be able to create any page using an external data source. I also want this method to cover the root (path `/`) page, so I'm using optional catch-all routes. I have a `[[...slug]].js` file that generates all my pages.
I'm using the Next canary 9.4.5 version to avoid issue #14886.
My app works fine when I run the development server. But when I try to create a build, I get this error:
```
Creating an optimized production build
Compiled successfully.
> Build error occurred
[Error: ENOENT: no such file or directory, rename '/pathtomyapp/.next/export/.html' -> '/pathtomyapp/.next/server/pages/.html'] {
errno: -2,
code: 'ENOENT',
syscall: 'rename',
path: '/pathtomyapp/.next/export/.html',
dest: '/pathtomyapp/.next/server/pages/.html'
}
```
When I remove the root route (the one where the slugs array is empty), the build doesn't break. It seems like Next wants to create an html file for each page, like `home.html`, then tries to create a `.html` file for the root instead of something like `index.html`.
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. Create a default Next app
2. Update it to the latest canary
3. In the pages folder, delete `index.js` and create a file called `[[...slug]].js` instead
4. In that `[[...slug]].js` file, paste this code:
```js
const MyPage = ({ slug }) => {
return <div>My page, slug {JSON.stringify(slug)}</div>;
};
export async function getStaticPaths() {
const paths = [
{
params: { slug: [] },
},
{
params: { slug: ["home"] },
},
{
params: { slug: ["home", "page"] },
},
];
return { paths, fallback: false };
}
export async function getStaticProps({ params }) {
return {
props: {
slug: params.slug || null,
},
};
}
export default MyPage;
```
5. Run `yarn dev`, and see that things are working as expected
6. Run `yarn build`, and watch the build fail
## Expected behavior
With the code provided above, Next.js should have been able to build these pages:
```
Page Size First Load JS
┌ /_app 3.47 kB 61.1 kB
├ ● /[[...slug]] 319 B 61.5 kB
├ ├ /
├ ├ /home
├ └ /home/page
└ ○ /404 3.25 kB 64.4 kB
```
## System information
- OS: macOS 10.15.5
- Version of Next.js: `^9.4.5-canary.29`
- Version of Node.js: 12.18.2 | https://github.com/vercel/next.js/issues/14964 | https://github.com/vercel/next.js/pull/14986 | 62902545df74906d931d1ae7bdaecb2d5c59811b | 33ebda1b7d1b39c3e354849f8cdbfbdba7264da3 | "2020-07-08T09:06:44Z" | javascript | "2020-07-09T04:21:49Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,959 | ["packages/next/client/link.tsx", "packages/next/client/page-loader.ts", "packages/next/next-server/lib/router/router.ts", "test/integration/dynamic-routing/pages/index.js", "test/integration/dynamic-routing/test/index.test.js"] | Link and router query should automatically replace dynamic route parts | # Feature request
It would be great if the `Link` component was smart enough to replace dynamic route parts in `pathname` automatically based on the `query` when using the url-object form of `href`:
```js
<Link href={{ pathname: "/posts/[id]", query: { id: 1, anotherParam: 2 } }}><a>...</a></Link>
```
Currently this renders `<a href="/posts/[id]?id=1&anotherParam=2">...</a>` which is _functional_ but odd (also it breaks getServerSideProps et al `params`). So in order to make this work, I have to replace the dynamic parts in `pathname` with matching `query` params and stringify a `search` to construct an `as` prop manually.
The same issue concerns `router.push` and `router.replace`.
Another example to illustrate the issue where it's quite tedious to construct the `as` prop would be to replace one or more query params of the current (unknown) route to link to another locale:
```js
const LinkCurrentRouteToLocale = ({ locale, ...rest }) => {
const { pathname, query } = useRouter();
// pathname being /[locale]/foo or similar
return <Link href={{ pathname, query: { ...query, locale } }} {...rest} />
}
```
## Describe the solution you'd like
If this was handled out of the box, using `{ pathname: "/posts/[id]", query: { id: 1, anotherParam: 2 } }` would create the URL `/posts/1?anotherParam=2` and the link would be `<a href="/posts/1?anotherParam=2">...</a>`.
I think adding this behavior would be a non-breaking change without any new API. It would be a big improvement over the current behavior. I also don't think that it would be at odds with a more sophisticated approach described in #8207
## Describe alternatives you've considered
An alternative could be to explicitly add a `params` prop to the url object form, e.g.
```js
<Link href={{ pathname: "/posts/[id]", params: { id: 1 }, query: { anotherParam: 2 } }}><a>...</a></Link>
```
But I don't see the benefit of doing this.
P.S.: I already posted this suggestion in https://github.com/vercel/next.js/issues/8207#issuecomment-537408323 but as that RFC had a much bigger scope it probably wasn't the right place to discuss this. | https://github.com/vercel/next.js/issues/14959 | https://github.com/vercel/next.js/pull/16774 | 22800319159d8594224e22766c33ca387761d05c | f8d92a67f04481cba7e8a3ac1ebc5a6b7dadc873 | "2020-07-08T08:01:18Z" | javascript | "2020-09-02T16:23:26Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,942 | ["examples/with-sitemap/.env", "examples/with-sitemap/README.md", "examples/with-sitemap/next.config.js", "examples/with-sitemap/package.json", "examples/with-sitemap/pages/contact.js", "examples/with-sitemap/pages/index.js", "examples/with-sitemap/public/favicon.ico", "examples/with-sitemap/public/sitemap.xml", "examples/with-sitemap/public/vercel.svg", "examples/with-sitemap/scripts/generate-sitemap.js"] | Add sitemap example | An example named `with-sitemap` that shows how to generate a sitemap based on your pages, this has been requested by feedback and we can do a better job at showing how it can be done. The example could also be added to FAQ in the Next.js site.
| https://github.com/vercel/next.js/issues/14942 | https://github.com/vercel/next.js/pull/15047 | 681ebfa5cbe24b738ee08a4a5964c0b942af49bb | cc541fb25260f7315d3e223d368cfad80c99f25a | "2020-07-07T20:30:38Z" | javascript | "2020-07-24T16:35:39Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,928 | ["packages/next/next-server/lib/router/router.ts", "test/integration/client-shallow-routing/pages/[slug].js", "test/integration/client-shallow-routing/test/index.test.js"] | Shallow routing value is incorrect when navigating back | # Bug report
Shallow routing is working incorrectly when user navigates backward.
## Describe the bug
Correctly would be to remember shallow value between current step and previous step.
## To Reproduce
1. User enters site
2. Navigates to a product page (using normal routing) -> user sees information about product
3. Changes information tab, url is updated (using shallow routing) -> user sees information from new tab
4. Navigates to a product (using normal routing) -> new product information is shown, everything is okay.
5. Navigates back -> Next.JS performs shallow routing, user still sees information from product from step 4 **(wrong)**
## Expected behavior
1. User enters site
2. Navigates to a product page (using normal routing) -> user sees information about product
3. Changes information tab, url is updated (using shallow routing) -> user sees information from new tab
4. Navigates to a product (using normal routing) -> new product information is shown, everything is okay.
5. Navigates back -> Next.JS remembers how was performed routing from step 3 to step 4 and performs normal routing, information about product is reloaded and shown to user.
| https://github.com/vercel/next.js/issues/14928 | https://github.com/vercel/next.js/pull/16477 | 120b41ec8a304ebec7c34648bc0fd4ecc8e9a778 | 32ee65efa1a28f2c0a9b9199af58c2b8b4daed33 | "2020-07-07T16:50:24Z" | javascript | "2020-08-22T21:51:14Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,923 | ["packages/next/build/webpack/loaders/next-serverless-loader.ts", "packages/next/client/page-loader.js", "test/integration/dynamic-optional-routing-root-fallback/next.config.js", "test/integration/dynamic-optional-routing-root-fallback/pages/[[...optionalName]].js", "test/integration/dynamic-optional-routing-root-fallback/test/index.test.js"] | Canary.29: Unexpected error in root path with optional catch all | # Bug report
## Describe the bug
Production build fails to render root path page when using optional catch all in canary.29 with fallback and empty static paths.
## To Reproduce
1. Install `[email protected]`
2. Create page `pages/[[...slug]].js`
3. Add following code:
```javascript
const CatchAllPages = () => {
return <div>Test</div>
}
export const getStaticPaths = async () => {
return {
paths: [],
fallback: true,
}
}
export const getStaticProps = async (ctx) => {
return {
props: {},
}
}
export default CatchAllPages
```
4. Run `next build && next start`
5. Go to `http://localhost:3000/`
6. See error
## Expected behavior
It should render
## Screenshots
In Chrome & Firefox same error:
<img width="614" alt="Screen Shot 2020-07-07 at 10 12 53 PM" src="https://user-images.githubusercontent.com/1407526/86794370-0554d480-c09f-11ea-8638-9384345d7de7.png">
In Safari, quite different error:
<img width="1067" alt="Screen Shot 2020-07-07 at 10 13 53 PM" src="https://user-images.githubusercontent.com/1407526/86794475-26b5c080-c09f-11ea-88c0-07e84db84ad7.png">
## System information
- OS: MacOS; Vercel as well
- Version of Next.js: 9.4.5-canary.29
- Version of Node.js: v12.16.3
- Browsers: All
## Additional context
If it helps, adding a breakpoint in the bundle code shows that this fails here (prettyfied bundle slice of code):
```javascript
fetch(t, {
credentials: "same-origin",
}).then(function (t) {
if (!t.ok) {
if (--n > 0 && t.status >= 500) return e();
throw new Error("Failed to load static props");
}
return t.json();
});
```
Logging here `t` (argument passed to `fetch`) when root path `localhost:3000/`, displays `t` as an empty string while other routes (e.g: `/de/` & `/fr/`) display, for example:
```markdown
/_next/data/77xPdya_xyQSG_SoVaE0m/de.json
/_next/data/77xPdya_xyQSG_SoVaE0m/fr.json
```
Since `fetch('').then(t => t.json())` would get the homepage fallback html code `t.json()` would fail with error shown in screenshots. | https://github.com/vercel/next.js/issues/14923 | https://github.com/vercel/next.js/pull/15149 | a1319098571158e559d069ae553abab8f25f09b9 | 8222d571e717a5edb21814bfed7b72dad7500e19 | "2020-07-07T14:24:47Z" | javascript | "2020-07-14T18:58:02Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,888 | ["test/integration/no-anon-default-export/test/index.test.js"] | The anonymous function Babel rule does not include file name | # Bug report
## Describe the bug
```
warn - Anonymous arrow functions cause Fast Refresh to not preserve local component state.
Please add a name to your function, for example:
Before
export default () => <div />;
After
const Named = () => <div />;
export default Named;
```
## To Reproduce
In a Next.js page, use this:
```tsx
export default function () {
return <div />;
}
```
## Expected behavior
```
warn - pages/index.js
Anonymous arrow functions cause Fast Refresh to not preserve local component state.
Please add a name to your function, for example:
Before
export default () => <div />;
After
const Named = () => <div />;
export default Named;
```
| https://github.com/vercel/next.js/issues/14888 | https://github.com/vercel/next.js/pull/15061 | 8a8ef641d852a62b26a0d6354c6a0ac085f3b77b | 03d4d14c991219f0755693770c93d939146975de | "2020-07-06T13:46:36Z" | javascript | "2020-07-12T15:33:39Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,884 | ["packages/next/cli/next-build.ts", "test/integration/build-warnings/test/index.test.js"] | Invalid flag provided to next build results in UnhandledPromiseRejectionWarning | # Bug report
## Describe the bug
While using next build, if an incorrect flag is provided then `UnhandledPromiseRejectionWarning`
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. `yarn create next-app example`
2. Select `Default Starter App`
3. `cd example`
4. `yarn next build --randomflag`
## Expected behavior
Should throw show an error stating invalid/unrecognized flag is being used
## Screenshots
<img width="1419" alt="Screenshot 2020-07-06 at 5 51 07 PM" src="https://user-images.githubusercontent.com/11258286/86592530-479fe800-bfb1-11ea-9999-43e249f3aa1e.png">
## System information
- OS: macOS
- Version of Next.js: v9.4.4
- Version of Node.js: v14.4.0
I'd be happy to take up this issue. | https://github.com/vercel/next.js/issues/14884 | https://github.com/vercel/next.js/pull/15049 | a8b2a8e61762f6e3170b8e66c2183665ee433c6b | fcd03091b4bb6e8d1cf0b7e0360f5992b37ebdb8 | "2020-07-06T12:22:26Z" | javascript | "2020-07-13T21:07:35Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,833 | ["packages/react-dev-overlay/package.json", "packages/react-refresh-utils/package.json"] | webpack dependency in @next/react-dev-overlay | I am playing with yarn 2, next.js and typescript.
There were some typescript-related issues with ```tsx``` files (e.g. "JSX element class does not support attributes because it does not have a 'props' property. [2607]" when using next ```Link```).
Updating from ```[email protected]``` to ```[email protected]``` resolved the ```tsx``` issues.
However, running ```next dev``` causes yarn to throw the following error:
```
$ yarn dev
ready - started server on http://localhost:3000
Error: @next/react-dev-overlay tried to access webpack, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: webpack (via "webpack")
Required by: @next/react-dev-overlay@virtual:662a71a5c3fcdc3fdda9ed7f117282fb9b068600afb7f480ffe899fb17c3e6a32a9896fc4a914d0ec4de737118ba46840dbb999b9260cdf0479462680dbb04b2#npm:9.4.5-canary.28 (via /home/rh/box/.yarn/$$virtual/@next-react-dev-overlay-virtual-4f642ef845/0/cache/@next-react-dev-overlay-npm-9.4.5-canary.28-b4e8895b98-0063344906.zip/node_modules/@next/react-dev-overlay/lib/)
[...]
```
Adding the following to ```.yarnrc.yml``` fixes the issue:
```
packageExtensions:
"@next/react-dev-overlay@*":
dependencies:
webpack: "*"
```
Would it be possible to add ```webpack``` to ```@next/react-dev-overlay``` dependencies? | https://github.com/vercel/next.js/issues/14833 | https://github.com/vercel/next.js/pull/14842 | 62ef872989d3fd1821d7568e179328aba36ad4e0 | 55bfafc8a7d65c16c16c6e0c94bc9d7f500d0ba7 | "2020-07-03T21:12:45Z" | javascript | "2020-07-05T21:42:33Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,782 | ["packages/next/build/index.ts", "packages/next/build/webpack/loaders/next-serverless-loader.ts", "packages/next/lib/load-custom-routes.ts", "packages/next/next-server/server/next-server.ts", "packages/next/next-server/server/render.tsx", "packages/next/next-server/server/router.ts", "packages/next/server/next-dev-server.ts", "test/integration/basepath/next.config.js", "test/integration/basepath/test/index.test.js"] | Figure out interplay between basePath and custom redirects / rewrites | As the title states, we need to decide the story for basePath & custom routes for the docs examples. | https://github.com/vercel/next.js/issues/14782 | https://github.com/vercel/next.js/pull/15041 | 4af7f6c7f573816a0ebe5a5a43a50ba99612e93e | 2d9d649d492b77adeddea0242ab6b7fe73d18079 | "2020-07-01T21:37:27Z" | javascript | "2020-07-12T19:03:49Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,757 | ["packages/next/lib/load-custom-routes.ts", "packages/next/server/hot-reloader.ts", "packages/next/server/next-dev-server.ts", "test/integration/basepath/test/index.test.js", "test/integration/trailing-slashes/test/index.test.js"] | Trailing slash redirect with basepath | # Bug report
## Describe the bug
Redirecting trailing slash to non-trailing slash url seems to strip the basepath twice
## To Reproduce
1. `yarn next build test/integration/basepath && yarn next start test/integration/basepath`
2. Visit `http://localhost:3000/docs/hello/`
3. Browser redirects to `/hello`, then there seems to be a history replace to `/docso`
## Expected behavior
Redirects to `http://localhost:3000/docs/hello`
| https://github.com/vercel/next.js/issues/14757 | https://github.com/vercel/next.js/pull/14781 | c9492a8cc947f183ec608931239ef04a235776fd | d2699be6e85530d11bce17c3b5161ebd6eafbf10 | "2020-07-01T06:52:02Z" | javascript | "2020-07-13T14:59:40Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,737 | ["examples/custom-server-hapi/next-wrapper.js", "examples/ssr-caching/server.js"] | Remove usage of `renderToHTML` from all examples | The `renderToHTML` is a private API that seems to have accidentally leaked into our examples. We should remove the usage of this function from all examples that have it.
Specifically:
- `custom-server-hapi`
- `ssr-caching`
- `examples/with-flow/flow-typed/next.js.flow` | https://github.com/vercel/next.js/issues/14737 | https://github.com/vercel/next.js/pull/16138 | d81ace268a43e83ddae98fa339dc825ea69a5b43 | 604ca6c61d048f3fe525ff9f756e29bb1c97fa5b | "2020-06-30T17:00:00Z" | javascript | "2020-08-13T04:43:46Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,736 | ["packages/next/next-server/server/render.tsx", "test/integration/custom-routes/next.config.js", "test/integration/custom-routes/pages/auto-export/[slug].js", "test/integration/custom-routes/test/index.test.js"] | We should not warn for doing a no-op rewrite for auto-exported dynamic pages | Our current example for proxying non-existing pages/assets to an upstream site leverages a no-op rewrite to trigger checking all pages/assets in the application before applying the final rewrite, this incorrectly triggers the rewriting to auto-exported dynamic pages warning | https://github.com/vercel/next.js/issues/14736 | https://github.com/vercel/next.js/pull/14751 | 066a18ffc8e0b1848a4dd52d6aae1adc63599e8d | dc49cd33eb20bf33fc03eceb91a85bbac15048cd | "2020-06-30T16:57:57Z" | javascript | "2020-07-02T04:12:41Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,735 | ["packages/next/client/index.js", "packages/next/next-server/lib/router/router.ts", "test/integration/basepath/test/index.test.js"] | The URL should not be updated for the 404 page when using basePath | When using `basePath` and a 404 page is visited the `basePath` is currently un-conditionally stripped even if it isn't present causing the URL to be changed for the 404 page when it shouldn't e.g. visiting `/missing` becomes `/docs/missing` | https://github.com/vercel/next.js/issues/14735 | https://github.com/vercel/next.js/pull/14740 | dd97c984b2627be87a0bb37aab88fbcd037621fc | a0c683208abdce84934061f6efd2b90de52d99b9 | "2020-06-30T16:55:58Z" | javascript | "2020-07-02T09:11:57Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,734 | ["packages/next/next-server/lib/router/router.ts", "test/integration/basepath/pages/link-to-root.js", "test/integration/basepath/test/index.test.js"] | Invalid trailing slash behavior with basepath and index route | See video when navigating from about back to index.
https://mega.nz/file/xRQU0CKK#iQbiAovc6uV2gygy8GhO_RLLl2SgMEyBPGutnkqt4YA | https://github.com/vercel/next.js/issues/14734 | https://github.com/vercel/next.js/pull/14756 | 9e83ba8cf6de3b7b25200d0d193d5d2f3f03c44f | 066a18ffc8e0b1848a4dd52d6aae1adc63599e8d | "2020-06-30T16:49:32Z" | javascript | "2020-07-02T03:48:10Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,711 | ["packages/next/build/webpack/plugins/wellknown-errors-plugin/index.ts", "packages/next/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts", "packages/next/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts", "packages/react-dev-overlay/src/middleware.ts", "test/acceptance/ReactRefreshLogBox.test.js", "test/acceptance/helpers.js", "test/integration/jsconfig-baseurl/test/index.test.js", "test/integration/jsconfig-paths/test/index.test.js", "yarn.lock"] | Bad module not found error from webpack | # Bug report
## Describe the bug

## To Reproduce
```tsx
import a from “b”;
```
## Expected behavior
A more clear message that says you're trying to import `b` and that's the problem. This message alludes to `a` being the problem.
---
Useful flag:

| https://github.com/vercel/next.js/issues/14711 | https://github.com/vercel/next.js/pull/15860 | 46488fbcc60b755a395c771f8b04767417f0effe | 405e42e41ef5df28ef69c035c9ae611139d8ec21 | "2020-06-30T04:51:52Z" | javascript | "2020-08-05T19:11:35Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,710 | ["test/integration/serverless-trace-revalidate/next.config.js", "test/integration/serverless-trace-revalidate/pages/revalidate.js", "test/integration/serverless-trace-revalidate/server.js", "test/integration/serverless-trace-revalidate/test/index.test.js"] | Missing test: serverless target should set correct revalidation (`cache-control`) header for both data and HTML request | Historically, we only set this cache control header for the data request but not the HTML request. We should double check it's correct.
Basically, when a page powered by `getStaticProps` is using `unstable_revalidate`, we need to double check the true serverless bundle (i.e. `experimental-serverless-trace` without `next start` emulator) has the correct headers. | https://github.com/vercel/next.js/issues/14710 | https://github.com/vercel/next.js/pull/15512 | 450e7130b082d8982f3e46c0e3e4dd7fad2d8048 | d68d21c3291d4126008e0d3d8035924e82bcc1ba | "2020-06-30T04:47:33Z" | javascript | "2021-01-23T15:15:13Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,708 | ["packages/create-next-app/README.md", "packages/next/README.md"] | Searching "create next app cli" on Google returns the wrong search result | Right now, searching "create next app cli" on Google gives a non official search result that does not generate applications with our template, nor supports our examples.
We should update the README for our Create Next App CLI to ensure it ranks correctly on Google, and have associated documentation with it as well. | https://github.com/vercel/next.js/issues/14708 | https://github.com/vercel/next.js/pull/14830 | 23ebe3e4aac920b57cf71cf5a530bcfaa7b186de | 00ebce55538f99b752408608aaecb85942f7d3dc | "2020-06-30T04:42:58Z" | javascript | "2020-07-24T01:56:32Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,701 | ["packages/next/client/dev/error-overlay/hot-dev-client.js", "packages/react-dev-overlay/src/client.ts", "packages/react-dev-overlay/src/internal/ReactDevOverlay.tsx", "packages/react-dev-overlay/src/internal/bus.ts", "packages/react-dev-overlay/src/internal/container/FullRefreshWarning.tsx", "packages/react-dev-overlay/src/internal/styles/ComponentStyles.tsx", "test/integration/custom-server/test/index.test.js"] | Fast Refresh full reload notification | When Fast Refresh has to fall back to a full page reload, we should first show an informative overlay to the user explaining why Fast Refresh had to bail out. This overlay should include the specific file that caused it, and the link to docs.
Once the user acknowledges this, the full reload should occur. After this, future full page reloads **should not display the overlay**, and instead, reload the page immediately.
This warning should reset every time the dev server is rebooted.
For bonus points, the overlay should also reset once a Fast Refresh is successfully performed in the same session. | https://github.com/vercel/next.js/issues/14701 | https://github.com/vercel/next.js/pull/28866 | 59c1f0393c24f9ee01dc6401620afcb1c682c108 | 83b04c89830d380709ff0dfc46467cf018535620 | "2020-06-30T04:32:29Z" | javascript | "2021-12-17T21:24:13Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,691 | ["packages/next/build/utils.ts", "packages/next/client/page-loader.js", "packages/next/next-server/lib/router/utils/escape-path-delimiters.ts", "test/integration/prerender/pages/catchall-explicit/[...slug].js", "test/integration/prerender/pages/dynamic/[slug].js", "test/integration/prerender/pages/index.js", "test/integration/prerender/test/index.test.js"] | Show a little error message when trying to send brackets as params | ```
export async function getStaticPaths(){
.
.
.
return { ... params: { id: "[1]"} }
}
```
This id param does not work because it overlaps with something. (probably slugs?) Result is no warning no nothing and 404 page.
A little warning for that could be useful so someone would not go 4 hours fixing other stuff. Or it maybe not, maybe I am the only one tried passing a parameter inside brackets. Anyways I spent some hours on nothing and this is the result, you can close the issue if you see it unnecessary | https://github.com/vercel/next.js/issues/14691 | https://github.com/vercel/next.js/pull/14717 | 272080c9c019106e3cfd3d4c99d4ede1b931eb9e | c9492a8cc947f183ec608931239ef04a235776fd | "2020-06-29T22:23:28Z" | javascript | "2020-07-13T14:42:27Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,688 | ["packages/next/build/index.ts", "packages/next/build/webpack-config.ts", "packages/next/cli/next-build.ts", "packages/next/next-server/server/config.ts", "test/integration/react-profiling-mode/test/index.test.js"] | Convert profiling mode from configuration option to CLI switch | Next.js should not allow users to configure their `next.config.js` to always produce profiling builds. These builds should be done as a one-off, and as such, done via the `next build` command with the `--profile` flag.
Configuring this in `next.config.js` makes it too likely to accidentally commit this setting, which causes **severe performance issues in production applications**.
This mimics the Create React App behavior which also didn't add a environment flag or setting for it. | https://github.com/vercel/next.js/issues/14688 | https://github.com/vercel/next.js/pull/14920 | 8cd149c3ff18d7aeb6c3bfe233e9e5fb619a3442 | 6d7cf2a9345e62ce3c448f6be63d47467a63e49e | "2020-06-29T18:40:09Z" | javascript | "2020-07-09T11:39:12Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,682 | ["docs/api-routes/dynamic-api-routes.md", "docs/routing/dynamic-routes.md", "packages/next/build/index.ts", "packages/next/next-server/server/config.ts", "packages/next/server/next-dev-server.ts", "test/integration/dynamic-optional-routing/next.config.js", "test/integration/dynamic-optional-routing/test/index.test.js", "test/integration/prerender/next.config.js", "test/integration/prerender/test/index.test.js"] | experimental optional catch all route not working | # Bug report
It's a small ads app with an enormous amount of possible search routes ( 200 categories and about 20,000 cities), where the search page can have the following configuration:
`/search` => main search page
`/search/city/rootCategory/parentCategory`
`/search/city/rootCategory/parentCategory/category`
It would seem possible to have it work like below, using the 'regular' dynamic route, but it does not look neat:
`/search/0/0/0/0` => main search page
`/search/city/rootCategory/parentCategory/0`
`/search/city/rootCategory/parentCategory/category`
It throws a couple of errors:
1 - `pageProps` is INITIALLY passed empty to `_app.js` causing errors due to missing props
2 - `pageProps` is subsequently populated but then, on top of the error caused by the missing props, it throws error of headers already sent.
## Describe the bug
Initial output of `console.log` on `_app.js`:
my app props {
Component: [Function: Search] { propTypes: {} },
router: ServerRouter {
route: '/search/[[...query]]',
pathname: '/search/[[...query]]',
query: { query: [Array] },
asPath: '/search/curitiba/produtos/ferramentas/mecanica',
basePath: '',
events: undefined,
isFallback: true
},
__N_SSG: true,
pageProps: {}
}
And likewise on `/search/[[...query]]].js`
search props {}
Then, it runs again, all by itself, populating the props but throwing the following error on the terminal (while the browser shows the missing prop ( category ) error:
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (_http_outgoing.js:526:11)
at DevServer.sendHTML (/Users/bernardo/Sites/next-app/node_modules/next/dist/server/next-dev-server.js:23:5)
at DevServer.render (/Users/bernardo/Sites/next-app/node_modules/next/dist/next-server/server/next-server.js:49:37)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Object.fn (/Users/bernardo/Sites/next-app/node_modules/next/dist/next-server/server/next-server.js:35:852)
at async Router.execute (/Users/bernardo/Sites/next-app/node_modules/next/dist/next-server/server/router.js:28:28)
at async DevServer.run (/Users/bernardo/Sites/next-app/node_modules/next/dist/next-server/server/next-server.js:44:494)
at async DevServer.handleRequest (/Users/bernardo/Sites/next-app/node_modules/next/dist/next-server/server/next- server.js:13:133) {
code: 'ERR_HTTP_HEADERS_SENT'
}
## To Reproduce
`/pages/search/[[...query]].js`
import axios from 'axios';
import { useRouter } from 'next/router';
import getCategories from '../../lib/getCategories';
import getCities from '../../lib/getCities';
import { urlWriter } from '../../tools/functions';
const Search = (props) => {
console.log('search props', props);
const router = useRouter();
if (router.isFallback) {
return <div>Loading...</div>;
}
return <div>Search</div>;
};
export default Search;
... graphql query removed for brevity....
export async function getStaticPaths() {
let categories = await getCategories();
let cities = await getCities();
categories = categories.data.categories;
cities = cities.data.collectionQueryAddresses;
const paths = [];
// main /search route
paths.push({
params: { query: ['0', '0', '0', '0'] },
});
cities.forEach((city) => {
categories.forEach((cat) => {
if (cat.root && cat.root.title === cat.parent.title) {
paths.push({
params: {
query: [
urlWriter(city.city),
urlWriter(cat.root.title),
urlWriter(cat.title),
'0',
],
},
});
}
if (cat.root && cat.root.title !== cat.parent.title) {
paths.push({
params: {
query: [
urlWriter(city.city),
urlWriter(cat.root.title),
urlWriter(cat.parent.title),
urlWriter(cat.title),
],
},
});
}
});
});
return {
paths,
fallback: true,
};
}
export async function getStaticProps({ params }) {
let categories = await getCategories();
let cities = await getCities();
categories = categories.data.categories;
cities = cities.data.collectionQueryAddresses;
console.log('params', params);
let variables = {
city: null,
categoryParent: null,
categoryId: null,
};
const { query } = params;
console.log('query 00', query[0]);
console.log('CITIES', cities);
if (query.length > 0) {
// get city as in data bank
const city = cities.filter((c) => {
return urlWriter(c.city) === query[0];
})
console.log('CITY', city[0].city);
if (query[3] === '0') {
const parentCategory = categories.filter((cat) => {
return urlWriter(cat.title) === query[2];
});
variables = {
city: city[0].city,
categoryParent: parentCategory[0].id,
categoryId: null,
}
} else {
const category = categories.filter((cat) => {
return cat.parent && urlWriter(cat.parent.title) === query[2] &&
urlWriter(cat.title) === query[3];
});
variables = {
city: city[0].city,
categoryParent: null,
categoryId: category[0].id,
};
}
}
console.log('VARIABLES', variables);
const data = await apiQl(queryQl, variables);
return {
props: {
ads: data.data.ads || [],
categories,
params,
},
};
}
And on `/pages//_app.js`
import withReduxSaga from 'next-redux-saga';
import PropTypes from 'prop-types';
import Head from 'next/head';
import { ThemeProvider } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';
import wrapper from '../store/reduxWrapper';
import theme from '../styles/theme';
import styles from '../styles/layout.css';
import 'react-quill/dist/quill.snow.css';
import Layout from '../components/layout';
function MyApp(props) {
console.log('my app props', props);
const { Component, pageProps } = props;
React.useEffect(() => {
const jssStyles = document.querySelector('#jss-server-side');
if (jssStyles) {
jssStyles.parentElement.removeChild(jssStyles);
}
}, []);
return (
<>
<Head>
<title>My page</title>
<meta
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width"
/>
</Head>
<ThemeProvider theme={theme}>
<CssBaseline />
<Layout categories={pageProps.categories}>
<Component {...pageProps} />
</Layout>
</ThemeProvider>
</>
);
}
MyApp.propTypes = {
Component: PropTypes.elementType.isRequired,
pageProps: PropTypes.object,
};
export default wrapper.withRedux(withReduxSaga((MyApp)));
## System information
- OS: macOS
- Version of Next.js: 9.4.4
- Version of Node.js: 12.16.0
| https://github.com/vercel/next.js/issues/14682 | https://github.com/vercel/next.js/pull/14687 | f12a9f92f8c44375ac74e2f3c5ca5e5b1c46880e | 1d0e7a8a9a008cb0287673a1c6dcc604a892a7bb | "2020-06-29T17:08:51Z" | javascript | "2020-06-29T18:50:32Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,668 | ["packages/next/client/page-loader.js", "packages/next/next-server/lib/router/router.ts", "test/integration/build-output/test/index.test.js", "test/integration/prerender/pages/index.js", "test/integration/prerender/pages/lang/[lang]/about.js", "test/integration/prerender/test/index.test.js"] | `fetchNextData` does not support dynamic SSG routes with mismatching `href` and `as` | Since `fetchNextData` doesn't use the same `/_next/data` building logic as `prefetching` when mismatching `href` and `as` values are provided for a dynamic SSG route the page data will be able to be prefetched but not loaded on client-transition. | https://github.com/vercel/next.js/issues/14668 | https://github.com/vercel/next.js/pull/14667 | b8a30bab55b8d2bf4511d902bdd0ecb1604e70de | 89ca0d10d45b1d8fce6cb0358a2662c27b61a850 | "2020-06-29T05:34:10Z" | javascript | "2020-06-29T15:14:45Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,646 | ["docs/advanced-features/preview-mode.md", "docs/api-routes/response-helpers.md", "packages/next/next-server/lib/utils.ts", "packages/next/next-server/server/api-utils.ts", "test/integration/api-support/pages/api/redirect-301.js", "test/integration/api-support/pages/api/redirect-307.js", "test/integration/api-support/test/index.test.js"] | Add `res.redirect` response helper for Passport.js (and convenience) | # Feature request
## Is your feature request related to a problem? Please describe.
Passport.js uses the `res.redirect` response helper internally. This is not covered in the example because the example uses `passport-local`, and the helper appears in `passport-oauth`. It would be great if this (and other Express response helpers) were available, at least for API routers.
## Describe the solution you'd like
Implement ExpressJS-like [res.redirect](https://github.com/expressjs/express/blob/master/lib/response.js#L909). This could be done as simply as:
```js
redirect(location) {
res.writeHead(302, {
Location: location,
})
res.end()
}
```
## Describe alternatives you've considered
So far, I've just been using a monkey patch solution. I've also used middleware, but this seems a bit hacky for something as simple as a server-side redirect. Again, this is an issue of Passport.js using res.redirect internally, so trying to pass authentication middleware to the routes fails.
| https://github.com/vercel/next.js/issues/14646 | https://github.com/vercel/next.js/pull/14705 | 2f78d8858fe1194de7512575bff1596533fb2770 | d19c34353da47cca5044e3726e900a978dcf0309 | "2020-06-28T06:50:01Z" | javascript | "2020-07-07T05:06:16Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,596 | ["docs/api-reference/next.config.js/exportPathMap.md"] | [Docs] Expand on the usage of the outDir config for next export | From feedback, I've seen that the usage of `outDir` is not clear about how it can be changed:

| https://github.com/vercel/next.js/issues/14596 | https://github.com/vercel/next.js/pull/14630 | b4b68c0b853d11beb23c6520011fe05fc169dced | 0f60377967f7cd72bb98ea4c7d524172bf95a87b | "2020-06-26T17:07:51Z" | javascript | "2020-06-27T17:33:49Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,595 | ["examples/with-tailwindcss/tailwind.config.js"] | Tailwind CSS base utilities not applied to production builds for TypeScript projects | # Bug report
## Describe the bug
Production builds of Next.js do not apply the base Tailwind utilities in the static build if any components in the `pages/` directory imports any external TypeScript components (such as `components/nav.tsx`), the build only apply the styling added into the
## To Reproduce
1. Create a new NextJS project using `yarn create next-app project-name`
1. Select `with-tailwindcss` example project
1. Add required TypeScript dependencies `yarn add --dev typescript @types/react @types/node`
1. Rename `components/nav.js` to `components/nav.tsx`
1. Run `yarn run build && yarn run start`
1. Navigate to `http://localhost:3000`
## Expected behavior
That it would leverage the base Tailwind CSS utilities and appear as the default rather than the screen shot below.
## Screenshots
The base utilities, such as flexbox, are lost. Only the styles using the `@apply` attribute in `styles/index.css` are applied.

## System information
- OS: macOS
- Version of Next.js: 9.2.0
- Version of Node.js: 14.4.0
## Additional context
This doesn't seem to happen if any page components are using TypeScript, only if the components that the page components import are using TypeScript.
| https://github.com/vercel/next.js/issues/14595 | https://github.com/vercel/next.js/pull/14621 | 61b68730f87e9285b16550a5621f73afec9b8dfe | 09b2a66f4983276269743335d100aebd1ab59097 | "2020-06-26T16:48:16Z" | javascript | "2020-06-27T11:08:10Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,573 | ["packages/next/build/utils.ts", "test/integration/export/pages/gssp/[slug].js", "test/integration/export/test/index.test.js"] | Static paths that end in a trailing slash get exported as `.html` | # Bug report
## Describe the bug
My CMS (WordPress) outputs links that end in trailing slashes e.g. `/my-blog-post/`.
In order to match those links correctly, I also return paths with trailing slashes in `getStaticPaths`:
```js
export const getStaticPaths = async () => ({
// (imagine this was generated)
paths: ['/my-blog-post/'],
fallback: false
});
```
In `next dev`, it correctly matches the path so that links with `<Link href="/my-blog-post/">` work as expected, however, when I run the build and export this, I get the following output:

Every trailing slash path becomes `.html` instead of `index.html`
## To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
1. run dev
```
git clone https://github.com/ricokahler/next-trailing-slash-export-bug.git
yarn
yarn dev
```
2. try clicking both links. notice how only the link with the trailing slash works in dev

3. `npx next export`
Notice `.html`

## Expected behavior
Since the trailing slash link works in dev, i think it's reasonable to assume it'll work when exported. That would require `.html` to be `index.html`
## System information
- OS mac 10.15.1
- Version of Next.js: 9.4.4
- Version of Node.js: v12.13.1
| https://github.com/vercel/next.js/issues/14573 | https://github.com/vercel/next.js/pull/14620 | 3909c76cef90f5da053b02dc7766455adbc3981f | bd24b70d601156e58f83850b4ed8a7d30fb274cd | "2020-06-26T04:41:02Z" | javascript | "2020-06-27T11:59:27Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,566 | ["packages/next/package.json", "test/integration/link-with-encoding/pages/index.js", "test/integration/link-with-encoding/pages/single/[slug].js", "test/integration/link-with-encoding/test/index.test.js", "yarn.lock"] | `native-url` trims trailing spaces from URL | See failing test case:
https://github.com/vercel/next.js/pull/14281#issuecomment-649703011 | https://github.com/vercel/next.js/issues/14566 | https://github.com/vercel/next.js/pull/14281 | c9bc101df89d28e33497e62371816abdf6b2a68e | ac5b2acd12f061c2a7cfeee414bad4f80212c7c6 | "2020-06-25T20:14:47Z" | javascript | "2020-06-29T20:44:43Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,500 | ["docs/advanced-features/custom-server.md", "docs/api-reference/next/router.md", "docs/routing/imperatively.md", "docs/routing/shallow-routing.md"] | Update next/router docs | Our current `next/router` docs (https://nextjs.org/docs/api-reference/next/router) use a combination between the `useRouter` hook and the `Router` object, ideally most examples should show the usage with `useRouter` as that's usually what you would need. | https://github.com/vercel/next.js/issues/14500 | https://github.com/vercel/next.js/pull/14515 | 3b12dbf48858ea0d05a7d7735415d1971599dbbe | c6dc34e4d72f2539f20b650b4303ab3744b45973 | "2020-06-23T16:07:18Z" | javascript | "2020-06-25T23:35:28Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,463 | ["packages/next/client/page-loader.js"] | Next.js prefetching should use requestIdleCallback | Our prefetching should use `requestIdleCallback` to prevent registering every single intersection observer tag in viewport at once. This will ensure we don't introduce first input delay during hydration.
We can look at [`quicklink`](https://github.com/GoogleChromeLabs/quicklink) for inspiration. | https://github.com/vercel/next.js/issues/14463 | https://github.com/vercel/next.js/pull/14580 | fb81ecb2bd85167d2676983a2489e29ea42b6b97 | edbb32cac9106ce9ae403265f894d9ebdddbe873 | "2020-06-22T18:30:26Z" | javascript | "2020-07-28T11:13:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,453 | ["docs/api-reference/next.config.js/basepath.md", "docs/manifest.json"] | Documentation for basePath | We need to add documentation for the new `basePath` support before landing on stable | https://github.com/vercel/next.js/issues/14453 | https://github.com/vercel/next.js/pull/14882 | 55bfafc8a7d65c16c16c6e0c94bc9d7f500d0ba7 | 6fe1260b5f8c4aaa9f0811e8a3aaa5b3798037fd | "2020-06-22T15:53:13Z" | javascript | "2020-07-06T12:35:51Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,452 | ["docs/api-reference/next.config.js/headers.md", "docs/api-reference/next.config.js/redirects.md", "docs/api-reference/next.config.js/rewrites.md", "docs/manifest.json"] | Documentation for custom routes | We need to add documentation for rewrites, redirects, and headers before landing on stable | https://github.com/vercel/next.js/issues/14452 | https://github.com/vercel/next.js/pull/14887 | 6fe1260b5f8c4aaa9f0811e8a3aaa5b3798037fd | fdc4c1773b55e18a432617286ef947a78f8ce66c | "2020-06-22T15:52:23Z" | javascript | "2020-07-06T14:01:42Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,434 | ["packages/react-dev-overlay/src/internal/components/CodeFrame/CodeFrame.tsx", "test/development/acceptance/ReactRefreshLogBox.test.ts", "test/development/acceptance/__snapshots__/ReactRefreshLogBox.test.ts.snap", "test/integration/config-devtool-dev/test/index.test.js"] | The whitespace stripping in the error overlay does not work when there is an empty line | The error overlay's whitespace stripping breaks when there is a new line with no whitespace in the middle of the code frame. | https://github.com/vercel/next.js/issues/14434 | https://github.com/vercel/next.js/pull/28277 | a5029e9fd4cefaecf6857c056ea377f862a92275 | 8ddcc6aedb6dcd424ff0e44c8d47450ae77a3723 | "2020-06-22T04:20:30Z" | javascript | "2022-08-08T02:16:42Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,425 | ["packages/next/next-server/lib/side-effect.tsx", "test/unit/next-head-rendering.test.js"] | next/head causes issue when rendered outside of Next.js | > have to switch back to the stable version :( the canary version has problems with `render`ing by testing-library/react
> `this.props.headManager.mountedInstances.add(this);` mountedInstances is undefined
_Originally posted by @coolgk in https://github.com/vercel/next.js/issues/8841#issuecomment-647180628_ | https://github.com/vercel/next.js/issues/14425 | https://github.com/vercel/next.js/pull/14511 | 574e9d285ac79b98f74e53ae6c5f2099fc8f1f80 | 5bb081f13f62b6ff33c74d792b798e9412671bf7 | "2020-06-21T22:01:08Z" | javascript | "2020-06-23T20:46:40Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,419 | ["packages/next/package.json", "test/integration/dynamic-routing/pages/index.js", "test/integration/dynamic-routing/test/index.test.js", "yarn.lock"] | Catch-all routes with a period followed by a two-digit number inserts `00` into the params | # Bug report
## Describe the bug
When you have a [catch all route](https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes), and the passed parameter includes a colon followed by exactly two numbers (e.g. `/a:42b`), then instead of passing that parameter as-is to the app (i.e. `a:42b`), Next.js inserts two zeroes (i.e. `a:4200b`). This only happens after client-side navigation, not on a fresh load of the page.
## To Reproduce
See https://github.com/Vinnl/nextjs-repro-catchall-bug.
Try it online: https://repro-catchall-bug.vercel.app/
## Expected behavior
For path parameters not to be modified.
## Screenshots

## System information
- OS: Ubuntu 20.04
- Browser: Firefox
- Version of Next.js: 9.4.4
- Version of Node.js: 12.16.1
| https://github.com/vercel/next.js/issues/14419 | https://github.com/vercel/next.js/pull/14442 | 1a838f45aab2597b32759f5d6786e2414fcf2a38 | fdcc24be6db7d0c2a3dc5e75f427a33669d61e25 | "2020-06-21T18:13:48Z" | javascript | "2020-06-25T17:19:12Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,417 | ["examples/with-realm-web/.env", "examples/with-realm-web/README.md", "examples/with-realm-web/lib/RealmClient.js", "examples/with-realm-web/package.json", "examples/with-realm-web/pages/index.js"] | Example with Monogdb ReamlWeb | # Feature request
since nextjs already includes examples with firebase/firestore, mongodb and other services, it would be nice to implement realm-web example
| https://github.com/vercel/next.js/issues/14417 | https://github.com/vercel/next.js/pull/14555 | a8d2c1ee9556281e9ea3c9a99a9c4e288cd269f2 | 1b5ca788104323d2851e70e7b4682ec815faca4a | "2020-06-21T17:46:47Z" | javascript | "2020-06-30T09:50:44Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,369 | ["packages/react-dev-overlay/package.json", "packages/react-dev-overlay/src/internal/components/Overlay/Overlay.tsx", "packages/react-dev-overlay/src/internal/components/Overlay/maintain--tab-focus.ts", "yarn.lock"] | Swap out ally.js for focus-trap-react | # Feature request
## Is your feature request related to a problem? Please describe.
[In the discussions](https://github.com/vercel/next.js/discussions/14056), a few of us have noticed some issues with the ally.js package that's imported in `@next/react-dev-overlay`.
I'm wondering if you'd be willing to swap our [ally.js](https://github.com/medialize/ally.js) for [`focus-trap-react`](https://github.com/davidtheclark/focus-trap-react). It appears the only place where ally.js is used is in the `@next/react-dev-overlay` and in that package, ally.js is only being used to trap focus.
## Describe the solution you'd like
…It seems like `focus-trap-react` is more _focused_ 😅
[Its bundle size is much smaller too](https://bundlephobia.com/[email protected]) vs [ally.js](https://bundlephobia.com/[email protected])
## Describe alternatives you've considered
There may be other libs I haven't considered but this one seems the most popular.
## Additional context
If you're accepting, I'd be willing to throw this together — at least to experiment. | https://github.com/vercel/next.js/issues/14369 | https://github.com/vercel/next.js/pull/20647 | 44ee7de664b1e67be5d60ee497d54eb5d602688d | e4a744653da0567edca794553536f3262b128b6d | "2020-06-19T18:29:20Z" | javascript | "2020-12-31T19:04:46Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,253 | ["packages/next/build/webpack/config/blocks/base.ts"] | Windows HMR reload speed | @helloitsm3 : The issue in this comment thread is around NextJS on WSL. I have tested out v9.4.4 on WSL and it totally doesn't reload on changes. It works like a charm when using over just windows and not involving WSL. I had to move from WSL based dev env to just windows.
So did you test v9.4.4 over Windows+WSL or just Windows?
_Originally posted by @AbProgr in https://github.com/vercel/next.js/discussions/12831#discussioncomment-26550_ | https://github.com/vercel/next.js/issues/14253 | https://github.com/vercel/next.js/pull/14254 | 5ed89d3021d62dcb1165202793718058978e7208 | 7ce000b328305737099549bc186ddd3a39a2528b | "2020-06-17T05:21:51Z" | javascript | "2020-06-17T12:59:00Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,221 | ["examples/with-strict-csp/pages/_document.js"] | Content-Security-Policy unsafe-eval in Next.js 9.4+ dev env | # Bug report
## Describe the bug
Content-Security-Policy ~~support is broken~~ *requires the use of unsafe-eval* in Next.js 9.4+ in dev env/mode. Presumably works without it in production. I think this is due to react-refresh using eval().
## To Reproduce
You can use the with-strict-csp example to test this:
1. `npx create-next-app --example with-strict-csp with-strict-csp-app`
2. `cd with-strict-csp-app`
3. `yarn dev`
4. `open http://localhost:3000`
5. Notice that nothing appears. Open browser console and see CSP errors
## Expected behavior
Website opens normally and React Fast Refresh works normally in dev env.
## Screenshots
Screenshots of CSP errors in Chrome's console:


## Additional context
This issue [was fixed back in Next.js 8](https://nextjs.org/blog/next-8#removed-inline-javascript) :tada: We've been using Next since v5 and ran into this issue with Next.js 7 upgrade, which got fixed in v8 and now it's back again 😄
We are using a small bit of code to patch this in dev env:
```
// In dev we allow 'unsafe-eval', so HMR doesn't trigger the CSP
if (process.env.NODE_ENV !== 'production') {
policies['script-src'].push("'unsafe-eval'");
}
``` | https://github.com/vercel/next.js/issues/14221 | https://github.com/vercel/next.js/pull/14262 | e87b739f335dad7b6f032c95a61f9aaa21ec667d | 42c309ad3771a4c77acb4a2dca539d8935eff51f | "2020-06-16T12:50:49Z" | javascript | "2020-06-18T04:25:15Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,204 | ["packages/next/build/index.ts", "packages/next/build/utils.ts"] | Add getStaticProps revalidation interval to CLI output | The Next.js build output should somehow visualize if a SSG page is setup for incremental static generation and/or incremental static regeneration.
Currently, there is no indication. | https://github.com/vercel/next.js/issues/14204 | https://github.com/vercel/next.js/pull/14365 | 6c59cbb46abc025eaf226dd01b44971f22014081 | 96a66c4bd326facd6e20a93bb3e6ef2d817c41f0 | "2020-06-15T20:32:47Z" | javascript | "2020-08-04T08:42:18Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,187 | ["examples/with-graphql-hooks/package.json"] | Example with-graphql-hooks is broken in Safari | # Bug report
## Describe the bug
A clear and concise description of what the bug is.
## To Reproduce
Open page in Safari
## Screenshots
Build page: __(The site does not respond to events)__
<img width="1680" alt="Zrzut ekranu 2020-06-15 o 15 52 43" src="https://user-images.githubusercontent.com/24297084/84665716-767ded80-af20-11ea-826e-3ee079963051.png">
Development:
<img width="1680" alt="Zrzut ekranu 2020-06-15 o 15 53 06" src="https://user-images.githubusercontent.com/24297084/84665739-7bdb3800-af20-11ea-9ddb-86fcebf11fa2.png">
## System information
- OS: macOS
- Browser (if applies) Safari (desktop/mobile), Chrome mobile
- Version of Next.js: v9.4.4
- Version of Node.js: v14.4.0 | https://github.com/vercel/next.js/issues/14187 | https://github.com/vercel/next.js/pull/14205 | 8cfa51878a66ad186932687e7594b31ba1eec3ca | 725376a9d759608f95749026bb0a473af0709eff | "2020-06-15T13:58:37Z" | javascript | "2020-06-16T08:33:57Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,093 | ["test/integration/config/test/index.test.js", "test/integration/css/test/index.test.js"] | Remove fake regex from tests in check helper | This will make the tests easier to understand when they fail. | https://github.com/vercel/next.js/issues/14093 | https://github.com/vercel/next.js/pull/14094 | 7e1d174e8eca04422c840328888235c2a76d8e78 | 8ae10601b12b621f76be576918962fca25d52dd7 | "2020-06-11T18:30:14Z" | javascript | "2020-06-11T19:02:53Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,085 | ["test/integration/css-fixtures/global-and-module-ordering/pages/index.js", "test/integration/css/test/index.test.js", "test/lib/next-test-utils.js"] | Automatically fail tests when our file replace utility cannot find pattern | Now that we automatically re-run failed tests, it's important that we don't silently succeed when we fail to replace content we expect to be replaced.
I don't expect any tests to break because of this. | https://github.com/vercel/next.js/issues/14085 | https://github.com/vercel/next.js/pull/14087 | c337db8d7e58f3c77ca11dd835922da1efd56156 | ec7c3252c3c8cbf3cc4cbd90376c025027a088ac | "2020-06-11T17:38:22Z" | javascript | "2020-06-11T18:29:38Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,070 | ["packages/next/package.json", "yarn.lock"] | installing `nextjs` behind a proxy takes a long time and prints errors in the console | # Bug report
## Describe the bug
```gherkin
Given I am behind a proxy
When I install nextjs
Then it succeeds # this is ✅ good
And it prints an error to the console # ❌ this is bad, but npm succeeds
And it takes a long time to succeed # 🔶
```
```
npm install nextjs
@ampproject/[email protected] postinstall /home/suprauser/workspace/wss_wss_nextjs-demo_PR-39/node_modules/@ampproject/toolbox-optimizer
AMP Optimizer ERROR Could not fetch validator rules { FetchError: request to https://cdn.ampproject.org/v0/validator.json failed, reason: connect ETIMEDOUT 172.217.169.33:443
at ClientRequest.<anonymous> (/home/suprauser/workspace/node_modules/node-fetch/lib/index.js:1455:11)
at ClientRequest.emit (events.js:189:13)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:189:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
message:
'request to https://cdn.ampproject.org/v0/validator.json failed, reason: connect ETIMEDOUT 172.217.169.33:443',
type: 'system',
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT' }
```
## Expected behavior
```gherkin
Given I am behind a proxy
When I install nextjs
Then it succeeds
And it prints no error to the console
And it completes withing a reasonable time
```
## Screenshots
If applicable, add screenshots to help explain your problem.
## System information
- OS: mac
- Version of Next.js: 9.4.4
- Version of Node.js: 10.16.3
## Additional context
See issue with [@amp-project/toolbox](https://github.com/ampproject/amp-toolbox/issues/832) | https://github.com/vercel/next.js/issues/14070 | https://github.com/vercel/next.js/pull/14095 | 8ae10601b12b621f76be576918962fca25d52dd7 | ec90cc83ff43df74a01583650110b597648f9283 | "2020-06-11T13:01:48Z" | javascript | "2020-06-11T19:28:56Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,039 | ["packages/next/build/webpack/loaders/next-serverless-loader.ts", "packages/next/next-server/lib/router/router.ts", "test/integration/basepath/pages/gssp.js", "test/integration/basepath/server.js", "test/integration/basepath/test/index.test.js"] | [experimental] Basepath should be unconditionally stripped from asPath on the client | To match https://github.com/vercel/next.js/issues/14037 on the client the `asPath` shouldn't contain the `basePath` either | https://github.com/vercel/next.js/issues/14039 | https://github.com/vercel/next.js/pull/14040 | 90638c70010310ba19aa0f28847b6226fdd20339 | 3d6d033a5b12996913b6532930294a1dc40846dc | "2020-06-10T19:22:39Z" | javascript | "2020-06-11T14:06:06Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,037 | ["packages/next/build/webpack/loaders/next-serverless-loader.ts", "packages/next/next-server/lib/router/router.ts", "test/integration/basepath/pages/gssp.js", "test/integration/basepath/server.js", "test/integration/basepath/test/index.test.js"] | [experimental] Basepath should be unconditionally stripped in serverless-loader | As discussed with @Timer the `basePath` should be unconditionally stripped in the `serverless-loader` to match behavior | https://github.com/vercel/next.js/issues/14037 | https://github.com/vercel/next.js/pull/14040 | 90638c70010310ba19aa0f28847b6226fdd20339 | 3d6d033a5b12996913b6532930294a1dc40846dc | "2020-06-10T18:17:55Z" | javascript | "2020-06-11T14:06:06Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,022 | ["packages/next/bin/next.ts", "test/integration/non-standard-node-env-warning/test/index.test.js"] | Our non-standard NODE_ENV error should know the target environment | Our `NON_STANDARD_NODE_ENV` error should warn when it detects `development` during `next start` or `next build` and when it detects `production` during `next dev`.
See https://github.com/vercel/next.js/issues/14019 where we did not warn for `development` in production, used to bypass intentional restrictions. | https://github.com/vercel/next.js/issues/14022 | https://github.com/vercel/next.js/pull/14033 | 21f8c6a7c3bc9eb5146b7e19cee85c663b555314 | d459b5f99a5a5c4f82f12713ac1bdf1d83f7df41 | "2020-06-10T14:35:29Z" | javascript | "2021-12-07T14:25:39Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,017 | ["packages/react-dev-overlay/src/internal/container/Errors.tsx", "test/integration/error-is-clickable/pages/first.js", "test/integration/error-is-clickable/test/index.test.js"] | Links rendered in the error overlay should be clickable | Similar to terminals, we should automatically detect links rendered in the error overlay "reason" for an error and make them clickable. | https://github.com/vercel/next.js/issues/14017 | https://github.com/vercel/next.js/pull/14055 | edbb32cac9106ce9ae403265f894d9ebdddbe873 | 23eb267499dafee6b0b42c7571bb6c7a2a74f22e | "2020-06-10T13:45:21Z" | javascript | "2020-07-28T11:22:28Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 14,016 | ["packages/react-dev-overlay/src/internal/helpers/launchEditor.ts"] | Overlay click-to-open in editor should bring window to front on Windows | On Windows, using the click-to-open in editor feature does not focus your editor into view. We should see if this is possible! | https://github.com/vercel/next.js/issues/14016 | https://github.com/vercel/next.js/pull/14307 | eead55cbaf278dfaa4eda9d055eb1042ec5dc535 | 19f3306aaadc00be1ba6d3521dfdeca49d7a95fe | "2020-06-10T13:42:49Z" | javascript | "2020-06-22T05:13:55Z" |
closed | vercel/next.js | https://github.com/vercel/next.js | 13,978 | ["packages/react-refresh-utils/internal/helpers.ts", "test/acceptance/ReactRefreshRegression.test.js"] | Fast refresh not working when page has exported config | # Bug report
Fast refresh not working when exporting page config. (hybrid amp pages)
```js
export const config = { amp: 'hybrid' };
```
## To Reproduce
Add the line above to a fast reresh enabled page
## Expected behavior
Fast refresh should work on react version of page (no amp).
## System information
- OS: Linux
- Browse: Chromium 83 Arch Linux
- Version of Next.js: 9.4.0
- Version of Node.js: 12.17
## Additional context
related #13104 | https://github.com/vercel/next.js/issues/13978 | https://github.com/vercel/next.js/pull/14041 | d5493ff24dd16cdda1059719ab9ec5a2cfec903f | 80036fd9ddd3638d61199a216730ad823daf93ea | "2020-06-09T20:57:56Z" | javascript | "2020-06-10T19:56:05Z" |
closed | PostHog/posthog | https://github.com/PostHog/posthog | 20,137 | ["posthog/hogql_queries/insights/lifecycle_query_runner.py", "posthog/hogql_queries/insights/trends/test/test_trends.py", "posthog/hogql_queries/insights/trends/trends_query_runner.py", "posthog/test/test_format_label_date.py", "posthog/utils.py"] | charts "grouped by month" are mislabelled on the x-axis - crucial UX bug | ## Bug description
The grouped-by-month view in charts is hella confusing. The x-axis shows a date that does not reflect the value on the y-axis.
1. the y-axis shows the number for the END of the month
2. the x-axis reads as "beginning of the month"

### Comparison with daily grouping
Compare the "group by month" view with "group by day". The x-axis labeling aligns with the y-axis values.

## How to reproduce
1. Group a chart by month
2. select "unique events"
## Proposal
### 1. easy fix - remove the "1." from the labelling
- will still confuse readers with "is this the beginning or end of the month"

### 2. correct fix - show end of month
- removes ambiguity from "is that the beginning or end of month"
- harder to implement because months have different end days

cc @jannesblobel | https://github.com/PostHog/posthog/issues/20137 | https://github.com/PostHog/posthog/pull/20141 | a136a09baeed723bc6cc17a7e158f19d9392cbf8 | 0257ecfd5679373517189813bdbaafda9886f0ea | "2024-02-05T15:42:15Z" | python | "2024-02-06T09:35:03Z" |
closed | PostHog/posthog | https://github.com/PostHog/posthog | 19,903 | ["frontend/src/queries/nodes/DataNode/LoadNext.tsx", "frontend/src/queries/nodes/DataNode/dataNodeLogic.ts", "frontend/src/queries/schema.json", "frontend/src/queries/schema.ts", "posthog/api/test/__snapshots__/test_query.ambr", "posthog/clickhouse/client/test/__snapshots__/test_execute_async.ambr", "posthog/hogql_queries/hogql_query_runner.py", "posthog/hogql_queries/insights/paginators.py", "posthog/hogql_queries/test/test_hogql_query_runner.py", "posthog/schema.py"] | Make the default HogQL `LIMIT` obvious | ## Is your feature request related to a problem?
It's currently not at all obvious that we apply a `LIMIT 100` clause to HogQL queries. This leads to confusion, like here: ZEN-9555.
## Describe the solution you'd like
We can probably get away with just some note somewhere.
Better yet, an "apply higher limit" button in the "reached end of results" message.
#### *Thank you* for your feature request – we love each and every one!
| https://github.com/PostHog/posthog/issues/19903 | https://github.com/PostHog/posthog/pull/19915 | 25e56f38b0cd8790e48ad3e15d04165c958c4222 | f927ea88c2cff2ad5ff59a210eab2f266b8c94e7 | "2024-01-22T13:30:17Z" | python | "2024-01-24T07:52:10Z" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.