We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://aptos.dev/en/build/sdks/wallet-adapter/dapp
When using the adapter, I encountered the following issue, and I hope to understand the reason why this problem was thrown.
./node_modules/@aptos-connect/wallet-adapter-plugin/dist/index.mjs:357:1 Module not found: Can't resolve 'aptos' https://nextjs.org/docs/messages/module-not-found Import trace for requested module: ./node_modules/@aptos-labs/wallet-adapter-react/node_modules/@aptos-labs/wallet-adapter-core/dist/index.mjs ./node_modules/@aptos-labs/wallet-adapter-react/dist/index.mjs ./src/app/layout.tsx
code sandbox
yarn dev
package.json
{ "name": "connect-wallet-adapter", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "@aptos-labs/ts-sdk": "^1.27.1", "@aptos-labs/wallet-adapter-ant-design": "^3.0.11", "@aptos-labs/wallet-adapter-react": "^3.6.0", "next": "14.2.6", "petra-plugin-wallet-adapter": "^0.4.5", "react": "^18", "react-dom": "^18" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "14.2.6", "postcss": "^8", "tailwindcss": "^3.4.1", "typescript": "^5" } }
src/app/layout.tsx
'use client' import { PropsWithChildren } from 'react' import { PetraWallet } from 'petra-plugin-wallet-adapter' import { AptosWalletAdapterProvider } from '@aptos-labs/wallet-adapter-react' import { WalletSelector } from '@aptos-labs/wallet-adapter-ant-design' import React from 'react' import { Aptos, AptosConfig, Network, APTOS_COIN, AccountAddressInput, } from '@aptos-labs/ts-sdk' const wallets = [new PetraWallet()] export default function RootLayout({ children }: PropsWithChildren) { return ( <body className="grow"> <AptosWalletAdapterProvider plugins={wallets} autoConnect={true} dappConfig={{ network: Network.TESTNET, aptosConnectDappId: 'dapp-id', }} > <WalletSelector /> <div className="mt-16">{children}</div> </AptosWalletAdapterProvider> </body> ) }
The text was updated successfully, but these errors were encountered:
Me too. the package is not compatible with Next.js 14
Sorry, something went wrong.
Me too, can anyone fix this?
No branches or pull requests
Link
https://aptos.dev/en/build/sdks/wallet-adapter/dapp
Issues
When using the adapter, I encountered the following issue, and I hope to understand the reason why this problem was thrown.
code sandbox
code sandbox
Current status
package.json
src/app/layout.tsx
The text was updated successfully, but these errors were encountered: