我是next.js的新手,我正在开发一个基于web3的网站,所以我不得不使用第三方网站。
首先,运行以下命令将第三个add添加到我的项目中:
yarn add @thirdweb-dev/react @thirdweb-dev/sdk ethers然后,我将app.tsx更改为以下代码:
import '../styles/globals.css'
import type { AppProps } from 'next/app'
import { ChainId, ThirdwebProvider } from "@thirdweb-dev/react"
function MyApp({ Component, pageProps }: AppProps) {
return (
<ThirdwebProvider desiredChainId={ChainId.Rinkeby}>
<Component {...pageProps} />
</ThirdwebProvider>
)
}
export default MyApp最后,它出错了:
调用堆栈
node_modules@coinbase\wallet-sdk\dist\connection\RxWebSocket.js webSocket.onclose (50:0)
能帮我一下吗?
发布于 2022-08-29 23:27:44
不能100%地确定仅仅基于这篇文章的问题,但是您可以开始使用CLI为第三get + Next.js推荐的设置:
npx thirdweb create --app --next我认为您的问题可能与您正在使用的SDK版本有关--您能在这里为我们提供这些吗?
https://stackoverflow.com/questions/73278978
复制相似问题