[Ethereum] Unknown network “ganache”. See your Truffle configuration file for available networks

truffletruffle-deploymenttruffle-migration

I am working windows 10 and have both

truffle.js

&

truffle-config.js

I am using command

truffle migrate –reset –networks rinkeby

Error produced: Unknown network "ganache". See your Truffle
configuration file for available networks. Truffle v5.0.19 (core:
5.0.19)

Here's my truffle configuration:

 networks: {

      development: {
        host: "127.0.0.1",
        port: 7545,
        network_id: "5777", // Match any network id
        from: "0x55690752ed06B1d37510D20B3516b2D12F007f6d"
      },

      rinkeby: {
        provider: () => new HDWalletProvider(mnemonic, infura),
        network_id: 4,
        gas: 6700000,
        gasPrice : 10000000000
      }
  },

The configurations are same for both truffle.js & truffle-config.js

Best Answer

I'm sure an answer is no longer needed for this, but in case anyone else has the same problem, --networks should be --network.

Related Topic