57'Land

Truffle|xxx Token has not been deployed to detected network (network/artifact mismatch)

Description

I’m testing one contract today with truffle console, and at the beginning I was running truffle test to test the contract. However, for some reason, I shifted to truffle console method. And I got the error above.

Solutions on line

I looked up many solutions on line, here are my finding.

My solution

It turns out the problem lies in 2_deploy_migration.js: var Ether_contract = artifacts.require("xxxToken"); truffle get to this first, but by the time the token has not been deployed.