Q:

Timeout error on deploying to Rinkeby from truffle migrate

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
    }
  }
}; 

A:

It's important to keep coolness of mind while learning the blockchain development complexities and connections.
In this case it was not clear from the tutorials I was following, but to actually deploy to any of the networks, you need to create a project id/token.
In this case as I was trying to deploy to the Rinkeby test network by Infura.io
--> I had to go to the website and create and account and then create a project, and the project key/id which I replaced in my truffle config and lo and behold! it works now.

