【问题标题】:Cannot find module '@chakra-ui/react' or its corresponding type declarations找不到模块 \'@chakra-ui/react\' 或其对应的类型声明
【发布时间】:2022-11-10 08:01:01
【问题描述】:

我正在尝试安装 @chakra-ui 并将其与 Next 一起使用,但它根本不起作用。我卸载并再次安装它,它不起作用。

我用npm i @chakra-ui/react @emotion/react@^11 @emotion/styled@^11 framer-motion@^6 安装时没有显示任何错误,但是当我使用 import {} from '@chakra-ui/react' 时它不起作用,它说:

找不到模块“@chakra-ui/react”或其对应类型 声明。

【问题讨论】:

    标签: typescript next.js chakra-ui


    【解决方案1】:

    卸载 chakra ui 为我解决了这个问题。 npm 卸载 i @chakra-ui/react @emotion/react @emotion/styled framer-motion

    【讨论】:

      猜你喜欢
      • 2021-02-20
      • 2021-03-17
      • 2021-08-27
      • 2021-01-19
      • 2022-10-17
      • 2022-11-05
      • 2021-12-20
      • 2022-06-25
      • 2022-11-10
      相关资源
      最近更新 更多