metaplex-foundation / metaplex

A directory of what the Metaplex Foundation works on!
https://metaplex.com
Apache License 2.0
3.32k stars 6.26k forks source link

[Bug]: TypeScript error in candy-machine-ui/src/MintCountdown.tsx(108,8) #2078

Open realsbd opened 2 years ago

realsbd commented 2 years ago

Which package is this bug report for?

candy machine ui

Issue description

Am running a new metaplex folder and I get this error when i run yarn start

`index.js:1 C:/Users/Test/Desktop/crypto_job/candy-machine-ui/src/MintCountdown.tsx TypeScript error in C:/Users/Test/Desktop/crypto_job/candy-machine-ui/src/MintCountdown.tsx(108,8): 'Countdown' cannot be used as a JSX component. Its instance type 'Countdown' is not a valid JSX element. The types returned by 'render()' are incompatible between these types. Type 'React.ReactNode' is not assignable to type 'import("C:/Users/Test/Desktop/crypto_job/candy-machine-ui/node_modules/@types/styled-components/node_modules/@types/react/index").ReactNode'. Type '{}' is not assignable to type 'ReactNode'. Type '{}' is missing the following properties from type 'ReactPortal': key, children, type, props TS2786

106 |   if (date) {
107 |     return (

108 | <Countdown | ^ 109 | date={date} 110 | onComplete={onComplete} 111 | renderer={renderCountdown}`

image

I have searched everywhere for solution but couldn't find. the mint page is not even loading.

Command

yarn start

Relevant log output

No response

Operating system

Windows 10

Priority this issue should have

High (immediate attention needed)

Check the Docs First

Abrahamcepedao commented 2 years ago

I currently have the exact same issue, could it be a problem with the library "react-countdown"?

sharpdabuilder commented 2 years ago

Same, facing the same issue, even came check if needed to update my metaplex version since it was a couple months old, but still the same....

mossow commented 2 years ago

Same issue for me

bypina commented 2 years ago

i keep getting this issue as well

developergrizzly commented 2 years ago

I am also facing same issue

kameoxylon commented 2 years ago

also facing the same issue

kameoxylon commented 2 years ago

I was able to fix this by updating @types/react to version 18 yarn add @types/react@18.0.0 But then my ConnectButton broke, and I was able to fix that by doing const ConnectButton:React.FC<ButtonProps> = styled(WalletMultiButton)

Egwq commented 2 years ago

I was able to fix this by updating @types/react to version 18 yarn add @types/react@18.0.0 But then my ConnectButton broke, and I was able to fix that by doing const ConnectButton:React.FC<ButtonProps> = styled(WalletMultiButton)

Could you have a solution for a mint button that disappears when one connects their wallet?