[英]Error occurs when importing framer-motion
安裝 framer-motion 並導入 { Frame, useMotionValue, useTransform } from 'framer';。 但是,我收到以下錯誤。
Cannot find module 'framer' or its corresponding type declarations.ts(2307)
您安裝了 framer-motion 對嗎? 然后你將不得不從那個庫本身導入!
你這樣做:
import { Frame, useMotionValue, useTransform } from "framer-motion"
npm i framer-motion
后:
import { useMotionValue, useTransform } from "framer-motion"
import { Frame } from "framer"
你誤解了“framer-motion”和“framer”
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.