When I successfully compiled and deployed contracts using Truffle and ganache-cli, I typed truffle develop
to get into the truffle(develop)>
, and then typed let instance = await Factory.deployed()
, it then showed Uncaught Error: CONNECTION ERROR: Couldn't connect to node http://127.0.0.1:9545/.
But actually I have opened the new ganache-cli by the command ganache-cli -p 9545
(successfully run and showed Listening on 127.0.0.1:9545
) before that.
Why this happened and what can I do?
truffle develop
and got into thetruffle(develop)>
, and then typedlet instance = await Factory.deployed()
, it then still showedUncaught Error: CONNECTION ERROR: Couldn't connect to node http://127.0.0.1:9545/.
Though I didn't open the new window to typedganache-cli -p 9545
, though I closed the only one ganache-cli (ganache-cli --allowUnlimitedContractSize
for deploying contracts) and then typedlet instance = await Factory.deployed()
, it still showed that. – xxs Jul 23 '20 at 7:42