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!,
}),
});
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:
here is the code that fails: