Connect Ganache to local truffle-config.js, present on D drive

Link Truffle projects to this workspace by adding their truffle-config.js or truffle.js file to this workspace.

Unknown network โ€œganacheโ€. See your Truffle configuration file for available networks.

:frowning:

usually it should work, did you add ganache in your truffle config?

how to delete the question :smile:

You donโ€™t have to delete it, maybe it will help someone else in the future too

1 Like

on truffle.config.js uncomment network and put Ganache network Port details
e.g. truffle.config.js > module exports > networks >> put Ganache network details which looks like this:-

networks{
development: {
host: โ€œ127.0.0.1โ€,// Localhost (default: none)
port: 7545, // Standard Ethereum port (default: none)
network_id: โ€œ5777โ€, // Any network (default: none)
},
}

it looks like this is also what I have in my truffle config:

      development: {
       host: "127.0.0.1",     // Localhost (default: none)
       port: 7545,            // Standard Ethereum port (default: none)
       network_id: "5777",       // Any network (default: none)
      },

when i truffle init, those networks are on comments
my mistake my mistake .