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

Can't load the client #1

Open
GabrielCartier opened this issue Mar 3, 2025 · 0 comments
Open

Can't load the client #1

GabrielCartier opened this issue Mar 3, 2025 · 0 comments

Comments

@GabrielCartier
Copy link

When initializing the client, I'm getting Anchor errors. My guess is that there is improper dependencies loaded:

Error fetching stakers profiles: TypeError: anchor_1.Wallet is not a constructor
    at Generator.next (<anonymous>)
    at new Promise (<anonymous>)
    at getGfmClient (src/lib/config/gfm-client.ts:11:33)
    at getStakersProfile (src/lib/services/get-stakers-profile.ts:20:38)
    at async GET (src/app/api/stakers/route.ts:11:17)

My code is simply:

export type GFMClient = Awaited<ReturnType<typeof initGoFundMemeSDK>>;

export async function getGfmClient(): Promise<GFMClient> {
  const connection = new Connection('https://api.mainnet-beta.solana.com');
  return await initGoFundMemeSDK({ connection });
}
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

1 participant