horizon-ui / horizon-tailwind-react-nextjs

Horizon UI Tailwind CSS NextJS ❇️ The trendiest & innovative Open Source Admin Dashboard Template for Tailwind CSS, NextJS & React!
https://horizon-ui.com/horizon-tailwind-react
MIT License
154 stars 66 forks source link

Vercel Deployment Failing with 'NoSSR' cannot be used as a JSX component. #5

Closed SSV0726 closed 11 months ago

SSV0726 commented 11 months ago

Build command worked successfully in local system .

but during deployment using vercel it is failing with



Failed to compile.
--
10:11:09.075 |  
10:11:09.076 | ./src/app/AppWrappers.tsx:19:11
10:11:09.076 | Type error: 'NoSSR' cannot be used as a JSX component.
10:11:09.076 | Its element type 'ReactElement<any, any> \| Component<{ children: any; }, any, any>' is not a valid JSX element.
10:11:09.076 | Type 'Component<{ children: any; }, any, any>' is not assignable to type 'Element \| ElementClass'.
10:11:09.077 | Type 'Component<{ children: any; }, any, any>' is not assignable to type 'ElementClass'.
10:11:09.077 | The types returned by 'render()' are incompatible between these types.
10:11:09.077 | Type 'React.ReactNode' is not assignable to type 'import("/vercel/path0/node_modules/@types/react-dom/node_modules/@types/react/index").ReactNode'.
10:11:09.077 | Type 'ReactElement<any, string \| JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
10:11:09.077 | Property 'children' is missing in type 'ReactElement<any, string \| JSXElementConstructor<any>>' but required in type 'ReactPortal'.
SuryaPrakashRJ commented 9 months ago

Hey! I am facing this problem. Could you share on how to resolve this. It would be helpful @SSV0726

SSV0726 commented 9 months ago

Hacky way is to change .tsx to .jsx , removing typescript code and it will work