blockchainethereumsoliditytruffleganache

Truffle migrate is not deploying to Ganache


I tried command truffle migrate --reset, but it is unable to connect to Ganche here is the error: enter image description here

This is the code inside truufle-config.js file: enter image description here

And these are the RPC server details: enter image description here


Solution

  • It seems there is a typo in your truffle-config.js: post instead of port.

    Try this out:

      networks: {
        development: {
          host: "127.0.0.1",
          port: 9545,
          network_id: "*"
        }
      },
    

    Then:

    And finally open a new terminal and run the following 2 commands in the same folder where the file truffle-config.js is hosted:

    truffle console ––network development
    
    migrate ––reset