【发布时间】:2021-04-11 12:26:06
【问题描述】:
安装 framer-motion 和 从'framer'导入{Frame,useMotionValue,useTransform};。但是,我收到以下错误。
Cannot find module 'framer' or its corresponding type declarations.ts(2307)
【问题讨论】:
-
framer-motion 有自己的 TypeScript 声明,因此您只需安装 framer-motion。你试过
yarn add framer-motion吗?告诉我你在 package.json 文件中看到的 framer-motion 版本?你不需要framer,你只需要framer-motion就可以了。试试this sandbox 或this -
版本是“framer-motion”:“3.10.6”。
标签: reactjs framer-motion