rsnext/errors/manifest.json

627 lines
18 KiB
JSON
Raw Normal View History

{
"routes": [
{
"title": "Messages",
"heading": true,
"routes": [
{
"title": "react-hydration-error",
"path": "/errors/react-hydration-error.md"
},
{
"title": "beta-middleware",
"path": "/errors/beta-middleware.md"
},
{
"title": "failed-loading-swc",
"path": "/errors/failed-loading-swc.md"
},
{
"title": "deprecated-target-config",
"path": "/errors/deprecated-target-config.md"
},
{
"title": "custom-document-image-import",
"path": "/errors/custom-document-image-import.md"
},
{
"title": "large-page-data",
"path": "/errors/large-page-data.md"
},
{
"title": "404-get-initial-props",
"path": "/errors/404-get-initial-props.md"
},
{
"title": "amp-bind-jsx-alt",
"path": "/errors/amp-bind-jsx-alt.md"
},
{
"title": "amp-export-validation",
"path": "/errors/amp-export-validation.md"
},
{
"title": "api-routes-body-size-limit",
"path": "/errors/api-routes-body-size-limit.md"
},
{
"title": "api-routes-static-export",
"path": "/errors/api-routes-static-export.md"
},
{
"title": "app-container-deprecated",
"path": "/errors/app-container-deprecated.md"
},
{
"title": "build-dir-not-writeable",
"path": "/errors/build-dir-not-writeable.md"
},
{
"title": "built-in-css-disabled",
"path": "/errors/built-in-css-disabled.md"
},
{
"title": "can-not-output-to-public",
"path": "/errors/can-not-output-to-public.md"
},
{
"title": "can-not-output-to-static",
"path": "/errors/can-not-output-to-static.md"
},
{
"title": "cant-override-next-props",
"path": "/errors/cant-override-next-props.md"
},
{
"title": "circular-structure",
"path": "/errors/circular-structure.md"
},
{
"title": "config-resolve-alias",
"path": "/errors/config-resolve-alias.md"
},
{
"title": "conflicting-amp-tag",
"path": "/errors/conflicting-amp-tag.md"
},
{
"title": "conflicting-public-file-page",
"path": "/errors/conflicting-public-file-page.md"
},
{
"title": "conflicting-ssg-paths",
"path": "/errors/conflicting-ssg-paths.md"
},
{
"title": "css-global",
"path": "/errors/css-global.md"
},
{
"title": "css-modules-npm",
"path": "/errors/css-modules-npm.md"
},
{
"title": "css-npm",
"path": "/errors/css-npm.md"
},
{
"title": "custom-error-no-custom-404",
"path": "/errors/custom-error-no-custom-404.md"
},
{
"title": "doc-crossorigin-deprecated",
"path": "/errors/doc-crossorigin-deprecated.md"
},
{
"title": "duplicate-sass",
"path": "/errors/duplicate-sass.md"
},
{
"title": "empty-configuration",
"path": "/errors/empty-configuration.md"
},
{
"title": "empty-object-getInitialProps",
"path": "/errors/empty-object-getInitialProps.md"
},
{
"title": "env-key-not-allowed",
"path": "/errors/env-key-not-allowed.md"
},
{
"title": "env-loading-disabled",
"path": "/errors/env-loading-disabled.md"
},
{
"title": "export-all-in-page",
"path": "/errors/export-all-in-page.md"
},
{
"title": "export-image-api",
"path": "/errors/export-image-api.md"
},
{
"title": "export-no-custom-routes",
"path": "/errors/export-no-custom-routes.md"
},
{
"title": "export-path-mismatch",
"path": "/errors/export-path-mismatch.md"
},
{
"title": "generatebuildid-not-a-string",
"path": "/errors/generatebuildid-not-a-string.md"
},
{
"title": "google-font-display",
"path": "/errors/google-font-display.md"
},
{
"title": "google-font-preconnect",
"path": "/errors/google-font-preconnect.md"
},
{
"title": "get-initial-props-as-an-instance-method",
"path": "/errors/get-initial-props-as-an-instance-method.md"
},
{
"title": "gsp-redirect-during-prerender",
"path": "/errors/gsp-redirect-during-prerender.md"
},
{
"title": "gssp-component-member",
"path": "/errors/gssp-component-member.md"
},
{
"title": "gssp-export",
"path": "/errors/gssp-export.md"
},
{
"title": "gssp-mixed-not-found-redirect",
"path": "/errors/gssp-mixed-not-found-redirect.md"
},
{
"title": "gssp-no-mutating-res",
"path": "/errors/gssp-no-mutating-res.md"
},
{
"title": "head-build-id",
"path": "/errors/head-build-id.md"
},
{
"title": "href-interpolation-failed",
"path": "/errors/href-interpolation-failed.md"
},
{
"title": "improper-devtool",
"path": "/errors/improper-devtool.md"
},
{
"title": "incompatible-href-as",
"path": "/errors/incompatible-href-as.md"
},
{
"title": "inline-script-id",
"path": "/errors/inline-script-id.md"
},
{
"title": "install-sass",
"path": "/errors/install-sass.md"
},
{
"title": "install-sharp",
"path": "/errors/install-sharp.md"
},
{
"title": "invalid-assetprefix",
"path": "/errors/invalid-assetprefix.md"
},
{
"title": "invalid-dynamic-suspense",
"path": "/errors/invalid-dynamic-suspense.md"
},
{
"title": "invalid-external-rewrite",
"path": "/errors/invalid-external-rewrite.md"
},
{
"title": "invalid-getstaticpaths-value",
"path": "/errors/invalid-getstaticpaths-value.md"
},
{
"title": "invalid-getstaticprops-value",
"path": "/errors/invalid-getstaticprops-value.md"
},
{
"title": "invalid-href-passed",
"path": "/errors/invalid-href-passed.md"
},
{
"title": "invalid-i18n-config",
"path": "/errors/invalid-i18n-config.md"
},
{
"title": "invalid-images-config",
"path": "/errors/invalid-images-config.md"
},
{
"title": "invalid-multi-match",
"path": "/errors/invalid-multi-match.md"
},
{
"title": "invalid-page-config",
"path": "/errors/invalid-page-config.md"
},
{
"title": "invalid-react-version",
"path": "/errors/invalid-react-version.md"
},
{
"title": "invalid-redirect-gssp",
"path": "/errors/invalid-redirect-gssp.md"
},
{
"title": "invalid-relative-url-external-as",
"path": "/errors/invalid-relative-url-external-as.md"
},
{
"title": "invalid-resolve-alias",
"path": "/errors/invalid-resolve-alias.md"
},
{
"title": "invalid-route-source",
"path": "/errors/invalid-route-source.md"
},
{
"title": "invalid-server-options",
"path": "/errors/invalid-server-options.md"
},
{
"title": "invalid-webpack-5-version",
"path": "/errors/invalid-webpack-5-version.md"
},
{
"title": "link-passhref",
"path": "/errors/link-passhref.md"
},
{
"title": "manifest.json",
"path": "/errors/manifest.json"
},
{
"title": "minification-disabled",
"path": "/errors/minification-disabled.md"
},
{
"title": "missing-document-component",
"path": "/errors/missing-document-component.md"
},
{
"title": "missing-env-value",
"path": "/errors/missing-env-value.md"
},
{
"title": "multi-tabs",
"path": "/errors/multi-tabs.md"
},
{
"title": "nested-reserved-page",
"path": "/errors/nested-reserved-page.md"
},
{
"title": "next-dynamic-modules",
"path": "/errors/next-dynamic-modules.md"
},
{
"title": "next-export-no-build-id",
"path": "/errors/next-export-no-build-id.md"
},
{
"title": "next-export-serverless",
"path": "/errors/next-export-serverless.md"
},
{
"title": "next-head-count-missing",
"path": "/errors/next-head-count-missing.md"
},
{
"title": "next-image-missing-loader",
"path": "/errors/next-image-missing-loader.md"
},
{
"title": "next-image-missing-loader-width",
"path": "/errors/next-image-missing-loader-width.md"
},
{
"title": "next-image-unconfigured-host",
"path": "/errors/next-image-unconfigured-host.md"
},
{
"title": "next-script-for-ga",
"path": "/errors/next-script-for-ga.md"
},
{
"title": "next-start-serverless",
"path": "/errors/next-start-serverless.md"
},
{
"title": "no-cache",
"path": "/errors/no-cache.md"
},
{
"title": "no-css-tags",
"path": "/errors/no-css-tags.md"
},
{
"title": "no-document-import-in-page",
"path": "/errors/no-document-import-in-page.md"
},
{
"title": "no-document-title",
"path": "/errors/no-document-title.md"
},
{
"title": "no-document-viewport-meta",
"path": "/errors/no-document-viewport-meta.md"
},
2021-07-15 20:04:17 +02:00
{
"title": "no-duplicate-head",
"path": "/errors/no-duplicate-head.md"
},
{
"title": "no-head-import-in-document",
"path": "/errors/no-head-import-in-document.md"
},
Adds ESLint with default rule-set (#23702) This PR re-includes ESLint with some notable changes, namely a guided setup similar to how TypeScript is instantiated in a Next.js application. To add ESLint to a project, developers will have to create an `.eslintrc` file in the root of their project or add an empty `eslintConfig` object to their `package.json` file. ```js touch .eslintrc ``` Then running `next build` will show instructions to install the required packages needed: <img width="862" alt="Screen Shot 2021-04-19 at 7 38 27 PM" src="https://user-images.githubusercontent.com/12476932/115316182-dfd51b00-a146-11eb-830c-90bad20ed151.png"> Once installed and `next build` is run again, `.eslintrc` will be automatically configured to include the default config: ```json { "extends": "next" } ``` In addition to this change: - The feature is now under the experimental flag and requires opt-in. After testing and feedback, it will be switched to the top-level namespace and turned on by default. - A new ESLint shareable configuration package is included that can be extended in any application with `{ extends: 'next' }` - This default config extends recommended rule sets from [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react), [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks), and [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next) - All rules in [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next) have been modified to include actionable links that show more information to help resolve each issue
2021-04-30 13:09:07 +02:00
{
"title": "no-html-link-for-pages",
"path": "/errors/no-html-link-for-pages.md"
},
{
"title": "no-on-app-updated-hook",
"path": "/errors/no-on-app-updated-hook.md"
},
{
"title": "no-page-custom-font",
"path": "/errors/no-page-custom-font.md"
},
{
"title": "no-router-instance",
"path": "/errors/no-router-instance.md"
},
{
"title": "no-server-import-in-page",
"path": "/errors/no-server-import-in-page.md"
},
Adds ESLint with default rule-set (#23702) This PR re-includes ESLint with some notable changes, namely a guided setup similar to how TypeScript is instantiated in a Next.js application. To add ESLint to a project, developers will have to create an `.eslintrc` file in the root of their project or add an empty `eslintConfig` object to their `package.json` file. ```js touch .eslintrc ``` Then running `next build` will show instructions to install the required packages needed: <img width="862" alt="Screen Shot 2021-04-19 at 7 38 27 PM" src="https://user-images.githubusercontent.com/12476932/115316182-dfd51b00-a146-11eb-830c-90bad20ed151.png"> Once installed and `next build` is run again, `.eslintrc` will be automatically configured to include the default config: ```json { "extends": "next" } ``` In addition to this change: - The feature is now under the experimental flag and requires opt-in. After testing and feedback, it will be switched to the top-level namespace and turned on by default. - A new ESLint shareable configuration package is included that can be extended in any application with `{ extends: 'next' }` - This default config extends recommended rule sets from [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react), [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks), and [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next) - All rules in [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next) have been modified to include actionable links that show more information to help resolve each issue
2021-04-30 13:09:07 +02:00
{
"title": "no-sync-scripts",
"path": "/errors/no-sync-scripts.md"
},
{
"title": "no-title-in-document-head",
"path": "/errors/no-title-in-document-head.md"
},
Adds ESLint with default rule-set (#23702) This PR re-includes ESLint with some notable changes, namely a guided setup similar to how TypeScript is instantiated in a Next.js application. To add ESLint to a project, developers will have to create an `.eslintrc` file in the root of their project or add an empty `eslintConfig` object to their `package.json` file. ```js touch .eslintrc ``` Then running `next build` will show instructions to install the required packages needed: <img width="862" alt="Screen Shot 2021-04-19 at 7 38 27 PM" src="https://user-images.githubusercontent.com/12476932/115316182-dfd51b00-a146-11eb-830c-90bad20ed151.png"> Once installed and `next build` is run again, `.eslintrc` will be automatically configured to include the default config: ```json { "extends": "next" } ``` In addition to this change: - The feature is now under the experimental flag and requires opt-in. After testing and feedback, it will be switched to the top-level namespace and turned on by default. - A new ESLint shareable configuration package is included that can be extended in any application with `{ extends: 'next' }` - This default config extends recommended rule sets from [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react), [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks), and [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next) - All rules in [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next) have been modified to include actionable links that show more information to help resolve each issue
2021-04-30 13:09:07 +02:00
{
"title": "no-unwanted-polyfillio",
"path": "/errors/no-unwanted-polyfillio.md"
},
{
"title": "non-standard-node-env",
"path": "/errors/non-standard-node-env.md"
},
{
"title": "opt-out-auto-static-optimization",
"path": "/errors/opt-out-auto-static-optimization.md"
},
{
"title": "opt-out-automatic-prerendering",
"path": "/errors/opt-out-automatic-prerendering.md"
},
{
"title": "page-without-valid-component",
"path": "/errors/page-without-valid-component.md"
},
{
"title": "popstate-state-empty",
"path": "/errors/popstate-state-empty.md"
},
{
"title": "postcss-function",
"path": "/errors/postcss-function.md"
},
{
"title": "postcss-ignored-plugin",
"path": "/errors/postcss-ignored-plugin.md"
},
{
"title": "postcss-shape",
"path": "/errors/postcss-shape.md"
},
{
"title": "prefetch-true-deprecated",
"path": "/errors/prefetch-true-deprecated.md"
},
{
"title": "prerender-error",
"path": "/errors/prerender-error.md"
},
{
"title": "production-start-no-build-id",
"path": "/errors/production-start-no-build-id.md"
},
{
"title": "promise-in-next-config",
"path": "/errors/promise-in-next-config.md"
},
{
"title": "public-next-folder-conflict",
"path": "/errors/public-next-folder-conflict.md"
},
{
"title": "react-version",
"path": "/errors/react-version.md"
},
{
"title": "render-no-starting-slash",
"path": "/errors/render-no-starting-slash.md"
},
{
"title": "reserved-page-prop",
"path": "/errors/reserved-page-prop.md"
},
{
"title": "rewrite-auto-export-fallback",
"path": "/errors/rewrite-auto-export-fallback.md"
},
{
"title": "routes-must-be-array",
"path": "/errors/routes-must-be-array.md"
},
{
"title": "ssg-fallback-true-export",
"path": "/errors/ssg-fallback-true-export.md"
},
{
"title": "static-dir-deprecated",
"path": "/errors/static-dir-deprecated.md"
},
{
"title": "threw-undefined",
"path": "/errors/threw-undefined.md"
},
{
"title": "undefined-webpack-config",
"path": "/errors/undefined-webpack-config.md"
},
{
"title": "url-deprecated",
"path": "/errors/url-deprecated.md"
},
{
"title": "webpack5",
"path": "/errors/webpack5.md"
},
{
"title": "client-side-exception-occurred",
"path": "/errors/client-side-exception-occurred.md"
},
{
"title": "future-webpack5-moved-to-webpack5",
"path": "/errors/future-webpack5-moved-to-webpack5.md"
},
{
"title": "link-multiple-children",
"path": "/errors/link-multiple-children.md"
},
{
"title": "no-img-element",
"path": "/errors/no-img-element.md"
},
{
"title": "no-head-element",
"path": "/errors/no-head-element.md"
},
{
"title": "non-dynamic-getstaticpaths-usage",
"path": "/errors/non-dynamic-getstaticpaths-usage.md"
},
{
"title": "placeholder-blur-data-url",
"path": "/errors/placeholder-blur-data-url.md"
add support for esm externals (#27069) add `experimental.esmExternals: boolean | 'loose'` config option remove `output.environment` configuration in favor of `target` | | `esmExternals: false` (default) | `esmExternals: 'loose'` | `esmExternals: true` | | ------------------------ | ------------------------------- | ----------------------- | -------------------- | | import cjs package | `require()` | `require()` | `require()` | | require cjs package | `require()` | `require()` | `require()` | | import mixed package | `require()` *** | `import()` | `import()` | | require mixed package | `require()` | `require()` | `require()` | | import pure esm package | `import()` | `import()` | `import()` | | require pure esm package | Error ** | `import()` * | Error ** | | import pure cjs package | `require()` | `require()` | Resolving error | | require pure cjs package | `require()` | `require()` | `require()` | cjs package: Offers only CJS implementation (may not even have an `exports` field) mixed package: Offers CJS and ESM implementation via `exports` field pure esm package: Only offers an ESM implementation (may not even have an `exports` field) pure cjs package: CommonJs package that prevents importing via `exports` field when `import` is used. `*` This case will behave a bit unexpected for now, since `require` will return a Promise. So that need to be awaited. This will be fixed once the whole next.js bundle is ESM. It didn't work at all before this PR. `**` This is a new Error when trying to require an esm package. `***` For mixed packages we prefer the CommonJS variant to avoid a breaking change. ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [x] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes
2021-07-10 18:49:02 +02:00
},
{
"title": "import-esm-externals",
"path": "/errors/import-esm-externals.md"
},
{
"title": "static-page-generation-timeout",
"path": "/errors/static-page-generation-timeout.md"
},
{
"title": "page-data-collection-timeout",
"path": "/errors/page-data-collection-timeout.md"
},
{
"title": "sharp-missing-in-production",
"path": "/errors/sharp-missing-in-production.md"
},
{
"title": "sharp-version-avif",
"path": "/errors/sharp-version-avif.md"
},
{
"title": "script-in-document-page",
"path": "/errors/no-script-in-document-page.md"
},
{
"title": "script-component-in-head-component",
"path": "/errors/no-script-component-in-head-component.md"
},
{
"title": "script-tags-in-head-component",
"path": "/errors/no-script-tags-in-head-component.md"
},
{
"title": "stylesheets-in-head-component",
"path": "/errors/no-stylesheets-in-head-component.md"
},
{
"title": "max-custom-routes-reached",
"path": "/errors/max-custom-routes-reached.md"
},
{
"title": "module-not-found",
"path": "/errors/module-not-found.md"
},
{
"title": "next-config-error",
"path": "/errors/next-config-error.md"
},
{
"title": "invalid-api-status-body",
"path": "/errors/invalid-api-status-body.md"
},
{
"title": "invalid-project-dir-casing",
"path": "/errors/invalid-project-dir-casing.md"
},
{
"title": "swc-disabled",
"path": "/errors/swc-disabled.md"
},
{
"title": "swc-minify-enabled",
"path": "/errors/swc-minify-enabled.md"
},
{
"title": "middleware-new-signature",
"path": "/errors/middleware-new-signature.md"
},
{
"title": "experimental-jest-transformer",
"path": "/errors/experimental-jest-transformer.md"
},
{
"title": "invalid-dynamic-options-type",
"path": "/errors/invalid-dynamic-options-type.md"
},
{
"title": "invalid-styled-jsx-children",
"path": "/errors/invalid-styled-jsx-children.md"
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environment there is a fixed location stored at `globalThis.location`. Then, if one tries to build a request with a relative URL it will work using that location global hostname as _base_ to construct its URL. For example: ```typescript // https://nextjs.org new Request('/test').url; // https://nextjs.org/test Response.redirect('/test').headers.get('Location'); // https://nextjs.org/test ``` However, if we attempt to run the same code from `about:blank` it would not work because the global to use as a base `String(globalThis.location)` is not a valid URL. Therefore a call to `Response.redirect('/test')` or `new Response('/test')` would fail. ### Edge Functions Runtime In Next.js Edge Functions runtime the situation is slightly different from a browser. Say that we have a root middleware (`pages/_middleware`) that gets invoked for every page. In the middleware file we expose the handler function and also define a global variable that we mutate on every request: ```typescript // pages/_middleware let count = 0; export function middleware(req: NextRequest) { console.log(req.url); count += 1; } ``` Currently we cache the module scope in the runtime so subsequent invocations would hold the same globals and the module would not be evaluated again. This would make the counter to increment for each request that the middleware handles. It is for this reason that we **can't have a global location** that changes across different invocations. Each invocation of the same function uses the same global which also holds primitives like `URL` or `Request` so changing an hypothetical `globalThis.location` per request would affect concurrent requests being handled. Then, it is not possible to use relative URLs in the same way the browser does because we don't have a global to rely on to use its host to compose a URL from a relative path. ### Why it works today We are **not** validating what is provided to, for example, `NextResponse.rewrite()` nor `NextResponse.redirect()`. We simply create a `Response` instance that adds the corresponding header for the rewrite or the redirect. Then it is **the consumer** the one that composes the final destination based on the request. Theoretically you can pass any value and it would fail on redirect but won't validate the input. Of course this is inconsistent because it doesn't make sense that `NextResponse.rewrite('/test')` works but `fetch(new NextRequest('/test'))` does not. Also we should validate what is provided. Finally, we want to be consistent with the way a browser behaves so `new Request('/test')` _should_ not work if there is no global location which we lack. ### What this PR does We will have to deprecate the usage of relative URLs in the previously mentioned scenarios. In preparation for it, this PR adds a validation function in those places where it will break in the future, printing a warning with a link that points to a Next.js page with an explanation of the issue and ways to fix it. Although middleware changes are not covered by semver, we will roll this for some time to make people aware that this change is coming. Then after a reasonable period of time we can remove the warning and make the code fail when using relative URLs in the previously exposed scenarios.
2022-01-19 16:10:25 +01:00
},
{
"title": "middleware-relative-urls",
"path": "/errors/middleware-relative-urls.md"
},
{
"title": "deleting-query-params-in-middlewares",
"path": "/errors/deleting-query-params-in-middlewares.md"
},
{
"title": "ignored-compiler-options",
"path": "/errors/ignored-compiler-options.md"
}
]
}
]
}