Skip to content
New issue

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

trouble use in nextjs #25

Open
butan2333 opened this issue Oct 28, 2024 · 2 comments
Open

trouble use in nextjs #25

butan2333 opened this issue Oct 28, 2024 · 2 comments

Comments

@butan2333
Copy link

butan2333 commented Oct 28, 2024

I've install [email protected] to an new next project(next 14.2.16) via npm and when I add as docs says, it shows an error
below.
image
But [email protected] works fine.
Here's package.json and layout.tsx in app root dir , nothing was changed except configure arweave-wallet-kit
package.json

{
  "name": "test-ar-kit",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "arweave-wallet-kit": "^1.0.7",
    "next": "14.2.16",
    "react": "^18",
    "react-dom": "^18"
  },
  "devDependencies": {
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "eslint": "^8",
    "eslint-config-next": "14.2.16",
    "postcss": "^8",
    "tailwindcss": "^3.4.1",
    "typescript": "^5"
  }
}

layout.tsx

import type { Metadata } from "next";
import localFont from "next/font/local";
import "./globals.css";
import { ArweaveWalletKit } from "arweave-wallet-kit";

const geistSans = localFont({
  src: "./fonts/GeistVF.woff",
  variable: "--font-geist-sans",
  weight: "100 900",
});
const geistMono = localFont({
  src: "./fonts/GeistMonoVF.woff",
  variable: "--font-geist-mono",
  weight: "100 900",
});

export const metadata: Metadata = {
  title: "Create Next App",
  description: "Generated by create next app",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased`}
      >
        <ArweaveWalletKit>{children}</ArweaveWalletKit>
      </body>
    </html>
  );
}

thanks.

@micovi
Copy link

micovi commented Nov 20, 2024

Hi, did you manage to get a fix for this? I'm in the exact case right now.

@butan2333
Copy link
Author

Hi, did you manage to get a fix for this? I'm in the exact case right now.

No, but v1.0.0 works fine. I'm not using it since I need only arconnect wallet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants