when ı run truffle migrate ı got this error
Something went wrong while attempting to connect to the network at http://127.0.0.1:8545. Check your network configuration. CONNECTION ERROR: Couldn't connect to node http://127.0.0.1:8545.
npm install -g npm
sudo npm install -g ganache-cli --force
rm package-lock.json
sudo npm install -g ganache-cli
also ı changed truffle-caonfig.json file
networks: {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
test: {
host: "127.0.0.1",
port: 7545,
network_id: "*"
},
Ok, I got the solution after an hour.
Solution: Ensure Ganache is Running: Make sure that Ganache is running and the local blockchain is active. If you closed the terminal where Ganache was running, start Ganache again by running the ganache command in a new terminal. then use commands on another terminal it will resolve the issue.