mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
0b35ddd825
This PR: - Moves `next.config.js` options under a "config" folder which includes references for other configuration such as the ESLint plugin. I figure it would be tidier than having "Next.config.js Options" and "Config" in the API reference. - Fixes the issue with the "config" folder not showing up in canary: https://linear.app/vercel/issue/DOC-3749/bug-figure-out-why-new-config-folder-isnt-showing-up-in-the-canary - Fixes the indentation issues and missing example header (caused by an invisible character). Redirects: https://github.com/vercel/front/pull/38704
29 lines
785 B
Plaintext
29 lines
785 B
Plaintext
---
|
|
title: The provided export path doesn't match the page.
|
|
---
|
|
|
|
## Why This Error Occurred
|
|
|
|
An `exportPathMap` path was improperly matched to a dynamically routed page.
|
|
This would result in the page missing its URL parameters.
|
|
|
|
## Possible Ways to Fix It
|
|
|
|
Change your `exportPathMap` function in `next.config.js` to have a path that matches the dynamically routed page.
|
|
|
|
```js filename="next.config.js"
|
|
module.exports = {
|
|
exportPathMap: function () {
|
|
return {
|
|
'/': { page: '/' },
|
|
// '/blog/nextjs': { page: '/blog/[post]/comment/[id]' }, // wrong
|
|
'/blog/nextjs/comment/1': { page: '/blog/[post]/comment/[id]' }, // correct
|
|
}
|
|
},
|
|
}
|
|
```
|
|
|
|
## Useful Links
|
|
|
|
- [exportPathMap](/docs/pages/api-reference/config/next-config-js/exportPathMap) documentation
|