I encounter a problem in the set up. “window is not defined”. Any ideas where this comes from and how to fix it ? Thanks
- “@web3auth/modal”: “^5.1.1”
- Platform: VSC
- Browser Console Screenshots:
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”,
},
});