rsnext/errors/export-path-mismatch.md
stefanprobst 279ae19c7e
docs: update links to docs site (#14305)
this updates some links to the docs site to their new location
2020-06-18 09:54:07 +00:00

756 B

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.

module.exports = {
  exportPathMap: function () {
    return {
      '/': { page: '/' },
      // '/blog/nextjs': { page: '/blog/[post]/comment/[id]' },        // wrong
      '/blog/nextjs/comment/1': { page: '/blog/[post]/comment/[id]' }, // correct
    }
  },
}