Skip to content

[React Native][Thirdweb v5] Error trying to implement SIWE on Expo API routes #3299

Description

@liktenherre

It seems like the error arrives when using import { privateKeyToAccount } from "thirdweb/wallets" on the server side, if I remove it it succeeds to build.

The error I get:

node_modules/thirdweb/dist/cjs/wallets/wallet-connect/controller.js: /my-project/node_modules/thirdweb/dist/cjs/wallets/wallet-connect/controller.js: Duplicate declaration "Linking" (This is an error on an internal node. Probably an internal error.)

here is the code that fails:

import { createThirdwebClient } from "thirdweb";
import { createAuth } from "thirdweb/auth";
import { privateKeyToAccount } from "thirdweb/wallets";

export const thirdwebClient = createThirdwebClient({
  secretKey: process.env.EXPO_PUBLIC_THIRDWEB_AUTH_PRIVATE_KEY,
});

export const thirdwebAuth = createAuth({
  domain: process.env.EXPO_PUBLIC_SERVER_URL || "",
  client: thirdwebClient,
  adminAccount: privateKeyToAccount({
    client: thirdwebClient,
    privateKey: process.env.EXPO_PUBLIC_THIRDWEB_AUTH_PRIVATE_KEY!,
  }),
});

Metadata

Metadata

Labels

BugSomething isn't working as intended in a provided reproduction.React Native SDKInvolves changes to the React Native SDK.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions