DEV Community

Discussion on: The Complete Guide to Full Stack Web3 Development

Collapse
 
ikjudd profile image
Ian Judd

hm.. about halfway through the piece (after building out index.js) I started getting this error when I try to run dev

Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.5.3)

Any ideas on how to resolve this?

Collapse
 
simeongavalyugov profile image
SimeonGavalyugov

I had the same error - for some reason new ethers.providers.JsonRpcProvider() wasn't recognizing the network running so I had to pass the url explicitly i.e

new ethers.providers.JsonRpcProvider("127.0.0.1:8545");

Collapse
 
akupsmee profile image
Ikenna Blaise Akupuome • Edited

it is most likely on your hardhat config file, try to make sure the network address and accounts array is visible to that file.