File size: 785 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
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