Next.js Discord

Discord Forum

LayoutProps is not valid (layout.tsx)

Unanswered
American Wirehair posted this in #help-forum
Open in Discord
American WirehairOP
I'm running into the following build error below:
Failed to compile.
src/app/[locale]/layout.tsx
Type error: Layout "src/app/[locale]/layout.tsx" has an invalid "default" export:
  Type "LayoutProps" is not valid.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command "yarn run build" exited with 1


I'm using the next-intl packge for internationalisation and i've followed the documentation closely. https://next-intl-docs.vercel.app/docs/getting-started/app-router

I'm using the app directory with Next.js 14.1.0 https://github.com/uixmat/firestarta/tree/main/src/app
It's an open-source project so all the codebase is accessible above.

Everything works perfectly in dev environment, the issue happens during lint type checks in the build process.

8 Replies

Does the layout actually provide a modal prop? Have you already tried with the default layout arguments given in the next intl guide?
just cant get it to build at all, im completely stumped by it
i'm running some incremental builds now to try and figure it out
the website looks dope tbh. great work
American WirehairOP
thank you so much
American WirehairOP
Ok so it's the modal that's causing the issue 😄
American WirehairOP
Just to update this thread it was the modal causing the issue, doesn’t seem to play well using intersecting layouts and parallel routes