Type error: Layout "layout.tsx" has an invalid "default" export:
Unanswered
Argentine ant posted this in #help-forum
Argentine antOP
I I am using Parallel routes based on the Next documentation. https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#conditional-routes
It is building locally successfully but when I deploy it to Vercel I get this error
My code:
I try differents variant of code, even the code from the documentation and it still failing
It is building locally successfully but when I deploy it to Vercel I get this error
Type error: Layout "app/[locale]/(protected)/dashboard/layout.tsx" has an invalid "default" export:
Type "IDashboardLayout" is not valid.My code:
'use client'
import { FC } from 'react'
import useDashboardHook from '@/app/[locale]/(protected)/dashboard/hooks/useDashboardHook'
import { IDashboardLayout } from '@/app/[locale]/(protected)/dashboard/models/DashboardLayout.types'
const DashboardLayout: FC<IDashboardLayout> = ({
children,
freeUser,
subUser
}) => {
const { isFreeUser } = useDashboardHook()
return (
<>
{isFreeUser ? freeUser : subUser}
{children}
</>
)
}
export default DashboardLayoutI try differents variant of code, even the code from the documentation and it still failing
1 Reply
Argentine antOP
This fail as well