Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The same as Type '{ children: Element[]; className: string; }' is missing the following properties from type 'Pick<MenuItemProps & ButtonHTMLAttributes<HTMLButtonElement>, "type" | "key" | "id" | "name" | "color" | "translate" | ... 262 more ... | "onResizeCapture">': nonce, onResize, onResizeCapture #379 with Typography, Card, CardHeader #830

Open
michaelaboctario opened this issue Sep 23, 2024 · 4 comments

Comments

@michaelaboctario
Copy link

I have this:
"dependencies": {
"@heroicons/react": "^2.1.5",
"@material-tailwind/react": "^2.1.10",
"next": "14.2.13",
"react": "^18.2.0",
"react-dom": "^18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18.2.21",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.13",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5.2.2"
}

and
.....

is doing

Type '{ children: string; color: "blue-gray"; className: string; }' is missing the following properties from type 'Pick<TypographyProps, "suppressHydrationWarning" | "className" | "color" | "id" | "lang" | "media" | "style" | "target" | "type" | "role" | "tabIndex" | "href" | ... 257 more ... | "ping">': placeholder, onPointerEnterCapture, onPointerLeaveCapture

Try to use MaterialTailwind with Nextjs.

@michaelaboctario michaelaboctario changed the title The same issue with Typography, Card, CardHeader The same as Type '{ children: Element[]; className: string; }' is missing the following properties from type 'Pick<MenuItemProps & ButtonHTMLAttributes<HTMLButtonElement>, "type" | "key" | "id" | "name" | "color" | "translate" | ... 262 more ... | "onResizeCapture">': nonce, onResize, onResizeCapture #379 with Typography, Card, CardHeader Sep 24, 2024
@Angelgamonal
Copy link

Hi, I suggest checking out discussion #651 . You'll find several possible solutions there

@michaelaboctario
Copy link
Author

Hi, thanks you.
As in discussion #651, using "@types/react": "18.2.39" works for me.

@n-devr
Copy link

n-devr commented Oct 24, 2024

+1 for "@types/react": "18.2.39" resolving the issue.

I had a newer version of @types/react (18.3.12) and had to downgrade to get rid of the error.

@risqiromadhoni
Copy link

I have this: "dependencies": { "@heroicons/react": "^2.1.5", "@material-tailwind/react": "^2.1.10", "next": "14.2.13", "react": "^18.2.0", "react-dom": "^18" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18.2.21", "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "14.2.13", "postcss": "^8", "tailwindcss": "^3.4.1", "typescript": "^5.2.2" }

and .....

is doing

Type '{ children: string; color: "blue-gray"; className: string; }' is missing the following properties from type 'Pick<TypographyProps, "suppressHydrationWarning" | "className" | "color" | "id" | "lang" | "media" | "style" | "target" | "type" | "role" | "tabIndex" | "href" | ... 257 more ... | "ping">': placeholder, onPointerEnterCapture, onPointerLeaveCapture

Try to use MaterialTailwind with Nextjs.

"devDependencies": {
   "@types/react": "^18.3.12",
},
"resolutions": {
   "@types/react": "18.2.39"
},

In my case i can use resolutions to fix error, so i can use both version (latest and 18.2.39) on my app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants