I have just finished the CryptoZombies tutorials, and was trying to deploy the file following their instructions to the Rinkeby network. But I keep getting this timeout error and am lost on how to proceed.
$truffle migrate --network rinkeby
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
/usr/local/lib/node_modules/truffle/build/webpack:/packages/provider/index.js:56
throw new Error(errorMessage);
^
Error: There was a timeout while attempting to connect to the network.
Check to see that your provider is valid.
If you have a slow internet connection, try configuring a longer timeout in your Truffle config. Use the networks[networkName].networkCheckTimeout property to do this.
at Timeout._onTimeout (/usr/local/lib/node_modules/truffle/build/webpack:/packages/provider/index.js:56:1)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
My truffle-config.js is as follows:
const HDWalletProvider = require("truffle-hdwallet-provider");
const mnemonic = "depth invite butter ...";
module.exports = {
networks: {
mainnet: {
provider: function () {
return new HDWalletProvider(mnemonic, "https://mainnet.infura.io/v3/YOUR_TOKEN")
},
network_id: "1"
},
rinkeby: {
provider: function () {
return new HDWalletProvider(mnemonic, "https://rinkeby.infura.io/v3/YOUR_TOKEN")
},
network_id: 4
}
}
};
YOUR_TOKEN
is your Infura project ID?