nextra icon indicating copy to clipboard operation
nextra copied to clipboard

Cryptic error output when `_meta.js` doesn't conform to zod shape

Open tstirrat15 opened this issue 3 weeks ago • 2 comments

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.

tstirrat15 avatar Dec 01 '25 17:12 tstirrat15

can i fix this issue ??

RAGHUKHAJURIA avatar Dec 09 '25 16:12 RAGHUKHAJURIA

can i fix this issue ??

already made a PR #4870 cc @dimaMachina

vladavoX avatar Dec 09 '25 20:12 vladavoX