TypeError: ethers.JsonRpcProvider is not a constructor - Plz help me to solve this code #6370
-
|
TypeError: ethers.JsonRpcProvider is not a constructor //complete code const ethers = require("ethers"); async function main() { } main() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Solution --- let provider = new ethers.providers.JsonRpcProvider(process.env.RPC_URL); -- repalce code in 5th line // make sure you run the ether js version below 6. |
Beta Was this translation helpful? Give feedback.
Solution --- let provider = new ethers.providers.JsonRpcProvider(process.env.RPC_URL); -- repalce code in 5th line
// make sure you run the ether js version below 6.