3

Im creating my dapp with following below tutorial. http://www.dappuniversity.com/articles/the-ultimate-ethereum-dapp-tutorial

however Im facing an error when I run

truffle console

it shows

>truffle console

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.0.17 (core: 5.0.16)
Node v10.15.3

I have tried

truffle init

but my command prompt got stacked after it showed

>truffle init

This directory is non-empty...
? Proceed anyway? Yes
- Preparing to download

can anyone please advise me what needed to be changed.

FYI the code inside truffle-config.js is

module.exports = {
  networks: {
    development: {
      host: "127.0.0.1",
      port: 7545,
      network_id: "*" // Match any network id
    }
  }
};

Thank you

  • Check your question please. The error implies that truffle-config.js should state port: 7545, but instead it is stating port: 7574. So I'm guessing that one of these two is not exactly what you say it is. – goodvibration May 15 at 13:44
  • Sorry typo! still facing same issue after changed to port: 7545 – Trey May 15 at 14:00
  • Well have you started an Ethereum node (e.g. Ganache) listening on 127.0.0.1:7545? – goodvibration May 15 at 14:09
  • Thank you its working now. Shame on me. – Trey May 15 at 14:16
2

Do truffle develop before doing truffle console

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.