Truffle petshop tutorial cannot connect to ganache

Hi, I have chosen a project to create dApps https://www.trufflesuite.com/tutorials/pet-shop

I am facing an issue while migrating a contract using Ganache

truffle migrate

Getting an error as below

Could not connect to your Ethereum client with the following parameters:

  • host > 127.0.0.1
  • port > 7545
  • network_id > *

Truffle v5.1.66 (core: 5.1.66)
Node v10.23.3

On checking google, I have tried various means but unable to get rid of error

I have added “disableConfirmationListener: true” in truffle-config.js file as per the screenshot too

image

Ganache is up & running too on same port 7545 as present in truffle-config.js

I am unable to fix error and request you to please advise on how to sort above issue.

P.S> - Please note I am new to blockhain

1 Like

Hi @Manoj_Bhardwaj,

Welcome to the community :wave:

Your configuration appears to be ok. You may want to check with the Truffle community for suggestions: https://www.trufflesuite.com/community

You could also try following the OpenZeppelin Learn guides: https://docs.openzeppelin.com/learn/developing-smart-contracts?pref=truffle