Ethereum “如何修复”;“未知网络”;加纳什;。有关可用网络,请参阅您的块菌配置文件。”;

Ethereum “如何修复”;“未知网络”;加纳什;。有关可用网络,请参阅您的块菌配置文件。”;,ethereum,truffle,ganache,Ethereum,Truffle,Ganache,我正试图在林克比部署一份合同。我正在使用以下命令: $ truffle migrate --networks rinkeby Compiling your contracts... =========================== > Compiling ./contracts/Migrations.sol > Compiling ./contracts/Voting.sol > Artifacts written to ./public/contracts/build

我正试图在林克比部署一份合同。我正在使用以下命令:

$ truffle migrate --networks rinkeby

Compiling your contracts...
===========================
> Compiling ./contracts/Migrations.sol
> Compiling ./contracts/Voting.sol
> Artifacts written to ./public/contracts/build/
> Compiled successfully using:
   - solc: 0.5.8+commit.23d335f2.Emscripten.clang

Unknown network "ganache". See your Truffle configuration file for available networks.
Truffle v5.0.22 (core: 5.0.22)
Node v11.6.0
它在
ganache cli中工作,但在rinkeby中不起作用,因为它给了我
未知网络“ganache”的错误。查看可用网络的块菌配置文件
,如上面的结果所示

这是我的
块菌配置.js

module.exports = {
  // See <http://truffleframework.com/docs/advanced/configuration>
  // to customize your Truffle configuration!
  contracts_build_directory: path.join(__dirname, "./public/contracts/build/"),
  networks: {
    development: {
      host: "127.0.0.1",
      port: 8545,
      network_id: 1000,
      gas: 4612388,
      gasPrice: 25000000000,
      total_accounts: 20,
      mnemonic
    },
    rinkeby: {
      provider: () => new HDWalletProvider(mnemonic, infuraURL),
      network_id: 4,
      gas: 4612388,
      gasPrice: 25000000000,
    },
  },
  solc: {
    optimizer: {
        enabled: true,
        runs: 200
    }
  }
};
module.exports={
//看
//定制您的块菌配置!
contracts\u build\u目录:path.join(\u dirname,“./public/contracts/build/”,
网络:{
发展:{
主持人:“127.0.0.1”,
港口:8545,
网络id:1000,
煤气:4612388,
加斯普里斯:2500000000,
账户总数:20,
记忆的
},
林克比:{
提供者:()=>新的HDWalletProvider(助记符,infuraURL),
网络id:4,
煤气:4612388,
加斯普里斯:2500000000,
},
},
solc:{
优化器:{
启用:对,
跑步次数:200次
}
}
};

对于出现此错误的任何人,我的问题是我写错了命令。正确的格式应为:
truffle migrate--network rinkeby#network没有“s”

谢谢,我会暂停我正在做的工作,直到另行通知