nextra
nextra copied to clipboard
Cryptic error output when `_meta.js` doesn't conform to zod shape
Make a _meta.js that looks like this:
export default {
discord: {
title: "Discord",
href: "https://authzed.com/discord",
newWindow: true,
},
}
And you'll get a build failure that looks like this:
⨯ [Error: ✖ Invalid input] {
environmentName: 'Server',
digest: '3583697844'
}
It doesn't indicate where the problem is. The issue is this line:
https://github.com/shuding/nextra/blob/c8238813e1ba425cdd72783d57707b0ff3ca52ea/packages/nextra/src/server/page-map/normalize.ts#L64
Which logs the error, but zod's prettification removes all context.
can i fix this issue ??
can i fix this issue ??
already made a PR #4870 cc @dimaMachina