Lesson 5 i keep getting TypeError: Cannot read properties of undefined (reading 'JsonRpcProvider') #6780
Emmanuel-Sokoyebom
started this conversation in
General
Replies: 2 comments 3 replies
-
If you're ethers version is above 6, you need to change your code to this: let provider = new ethers.JsonRpcProvider("http://172.31.96.1:7545");
let wallet = new ethers.Wallet(
"<private key>",
provider
); and you're using the Ubuntu system (WSL), you need to change your RPC_URL as well |
Beta Was this translation helpful? Give feedback.
2 replies
-
first of all copy the right rpc_url ( You seem to be missing the last 5 ) then downgrade ethersjs to v5.7.2 `npm install [email protected] |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Beta Was this translation helpful? Give feedback.
All reactions