I first started ganache and see in the log that "Ganache started successfully" with the RPC Server set as: HTTP://127.0.0.1:7545
While running truffle migrate
command, I've received the following message:
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)
Here is my truffle-config.js file:
require('babel-register');
require('babel-polyfill');
require('dotenv').config();
module.exports = {
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
}
}
}
}
I'm wondering if there's any way to check if the issue is the client can't accept RPC connections or if it's not accessible over the network as I don't think it's suggestions 1 and 4.