rsnext/errors/export-path-mismatch.mdx
Delba de Oliveira 44d1a1cb15
docs: Migrate error messages to MDX and App Router. (#52038)
This PR is part of a larger effort to migrate error messages to MDX and
use App Router: https://github.com/vercel/front/pull/23459
2023-07-05 06:11:16 -07:00

28 lines
778 B
Text

---
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/next-config-js/exportPathMap) documentation