If you have a file of .npmrc. Change the values of prefer-offline, offline, and cache-only to false.
prefer-offline=false offline=false # Use only local cache and installed packages cache-only=false