小编myB*_*myB的帖子

Next.js“_framerMotion.motion.custom 不是函数”

我在 Next.js 中遇到 Chakra UI 问题。我已经正常安装了所有软件包。我已经编辑了_app.tsx。

import { AppProps } from 'next/app'
import { ChakraProvider } from '@chakra-ui/react'
import '../styles/globals.css'

function MyApp({ Component, pageProps }: AppProps) {
  return (
    <ChakraProvider>
      <Component {...pageProps} />
    </ChakraProvider>
  )
}

export default MyApp
Run Code Online (Sandbox Code Playgroud)

但是当我尝试启动开发服务器时,它给了我这样的错误:

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
event - compiled successfully
event - build page: /
wait  - compiling...
event - compiled successfully
event - build page: /next/dist/pages/_error
wait  - compiling...
event - compiled successfully
error - TypeError: _framerMotion.motion.custom …
Run Code Online (Sandbox Code Playgroud)

reactjs framer-motion chakra-ui

5
推荐指数
2
解决办法
1474
查看次数

标签 统计

chakra-ui ×1

framer-motion ×1

reactjs ×1