1
Could not connect to your Ethereum client with the following parameters: - host > 127.0.0.1 - port > 7545 - network_id > * Please check that your Ethereum client: - is running - is accepting RPC connections (i.e., "--rpc" option is used in geth) - is accessible over the network - is properly configured in your Truffle configuration file (truffle-config.js)

Truffle v5.3.9(核心:5.3.9)节点 v16.3.0

这是来自这个视频https://youtu.be/XLahq4qyors?t=1385

是的,我的 ganache 已打开,我的 truffle-config.json 正确配置了正确的端口,并且所有尝试了这项工作的其他解决方案,但不幸的是它不起作用

我的配置

需要('babel-polyfill');

  networks: {
    development: {
      host: "127.0.0.1",
      port: 7545,
      network_id: "*" // Match any network id
    },
  },
  contracts_directory: './src/contracts/',
  contracts_build_directory: './src/abis/',
  compilers: {
    solc: {
      optimizer: {
        enabled: true,
        runs: 200
      },
      evmVersion: "petersburg"
    }
  }
}```
4

0 回答 0