I'm trying to install @chakra-ui and use it with Next, but it doesn't work at all. I uninstalled and installed it again and it doesn't work.
I used npm i @chakra-ui/react @emotion/react@^11 @emotion/styled@^11 framer-motion@^6
didn't show any error on installation, but when I go to use import {} from '@chakra-ui/react' it just doesn't work, it says:
Cannot find module '@chakra-ui/react' or its corresponding type declarations.
Sometimes it happens due to a TS server error. So ideally click ctrl+shift+p (Windows) and select the option "restart ts server". Had this issue many times and usually fixed import issues.
I fixed this by uninstalling then re-installing chakra-ui. Try this:
npm uninstall @chakra-ui/react
then re-install:
npm install @chakra-ui/react
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With