当我将我的下一个js站点部署到vercel时,我遇到了这个构建错误。
15:02:38 > Build error occurred
15:02:38 Error: Export encountered errors on following paths:
15:02:38 /about/undefined
15:02:38 at exportApp (/vercel/workpath0/node_modules/next/dist/export/index.js:30:1103)
15:02:38 at processTicksAndRejections (internal/process/task_queues.js:97:5)
15:02:38 at async /vercel/workpath0/node_modules/next/dist/build/index.js:39:69
15:02:38 at async /vercel/workpath0/node_modules/next/dist/build/tracer.js:1:525
我的网站没有名为about的页面,所以我真的不知道这个错误指的是什么。我尽我所能找出一个可靠的答案,但我不能。任何帮助都是感激的!
发布于 2021-01-10 19:11:12
我发现有一个对象没有生成页面所需的属性。一旦我移除了它,一切都变好了
发布于 2021-06-04 01:14:27
已通过输出以下日志解决此问题。所有页面都已被记录。
export async function getStaticProps({ params: {slug} }) {
// ↓add
console.log(`Building slug: ${slug}`)
}
发布于 2021-05-13 22:33:20
我也得到了这个错误。我发现我正在使用一个没有道具的组件。移除它或传递道具就可以解决这个问题
https://stackoverflow.com/questions/65425601
复制相似问题