Truffle test – network error

truffle(ganache)> truffle test
Error: You must specify a network_id in your ‘ganache’ configuration in order to use this network.

Go to config file: truffle-config.js -> uncomment ‘development’ section in ‘networks’. Change port if you have a different one in Ganache, e.g. modfiy from 8545 to 7545.

Save file -> back to console -> run command: ‘truffle test –network development’

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: