What is wrong here?
const userWalletKeys = Wallet.createRandom().mnemonic
const userWallet = ethers.Wallet.fromMnemonic(userWalletKeys.phrase)
I get this error at line 2 of code:
Uncaught TypeError: ethers__WEBPACK_IMPORTED_MODULE_3__.Wallet.fromMnemonic is not a function
I tried to generate a random mnemonic phrase for a ether wallet.
Just been using ChatGPT to debug this very same error and after many twists and turns it suggested to fall back to ethers 5.0.0 (modifying package.json) and that worked. It seems in version 6.1.0 that method has dissappeared or maybe isn't ready yet or something...