This is a simple error, am created a next.js 13.5 latest project. and then install material-tailwind. then for testing when am use Just click me from material, in development mode it's running perfectly..but when am using yarn build or hosting vercel, it's showing error. and when am removing components imported from material-tailwind, it's perfectly running in development mode and also building and deploying perfectly..but again if I import any component from material-tailwind, it's working perfectly in development mode, but when trying to build, it's giving error, this is error,
yarn run v1.22.19
$ next build
✓ Creating an optimized production build
✓ Compiled successfully
✓ Linting and checking validity of types
✓ Collecting page data
Generating static pages (4/5) [== ]
RangeError: Maximum call stack size exceeded
at P (/home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:66159)
at l (/home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:61350)
at /home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:62551
at Array.forEach (<anonymous>)
at /home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:62524
at Array.forEach (<anonymous>)
at a (/home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:62344)
at /home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:62608
at Array.forEach (<anonymous>)
at l (/home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:62301)
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
RangeError: Maximum call stack size exceeded
at P (/home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:66159)
at l (/home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:61350)
at /home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:62551
at Array.forEach (<anonymous>)
at /home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:62524
at Array.forEach (<anonymous>)
at a (/home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:62344)
at /home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/chunks/490.js:10:62608
at Array.forEach (<anonymous>)
at l (/home/abdullah/projects/next/fleet/fleet-frontend-2nd/.next/server/c
✓ Generating static pages (5/5)
> Export encountered errors on following paths:
/page: /
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
and this is my testing code in page.js file
"use client";
import { Button } from "@material-tailwind/react";
const Home = () => {
return (
<main>
<Button>Click me</Button>
</main>
);
};
export default Home;