"window is not defined" error

I encounter a problem in the set up. “window is not defined”. Any ideas where this comes from and how to fix it ? Thanks

Please provide the Web3Auth initialization and login code snippet below:
const { Web3Auth } = require(“@web3auth/modal”);
const ethers = require(“ethers”);

const web3auth = new Web3Auth({
clientId: “XXXXXXX”,
web3AuthNetwork: “cyan”,
chainConfig: {
chainNamespace: “eip155”,
chainId: “0x66EEB”, // hex of 421611
rpcTarget: “https://rpc.ankr.com/arbitrum”,
// Avoid using public rpcTarget in production.
// Use services like Infura, Quicknode etc
displayName: “Arbitrum Testnet”,
blockExplorer: “https://testnet.arbiscan.io”,
ticker: “AETH”,
tickerName: “AETH”,
},
});

Hey @sebastienthefirst

Kindly ensure that you are using the most recent version of @web3auth/modal, which is v5.2.0. Additionally, you may visit our examples repository at GitHub - Web3Auth/web3auth-pnp-examples for reference.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.