'composer require - Could not find a matching version of package

Whenever I run composer require [package name] I get this:

composer require usmanhalalit/laracsv

                                                                                                                                                                                            
  [InvalidArgumentException]                                                                                                                                                                
  Could not find a matching version of package usmanhalalit/laracsv. Check the package spelling, your version constraint and that the package is available in a stability which matches yo  
  ur minimum-stability (dev).                                                                                                                                                               
                                                                                                                                                                                            

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]... 

I get this message with any package so it's not just an issue with usmanhalalit/laracsv. I also get the message if I declare the package + version directly in composer.json and then run composer update.

Composer diagnose: (I've made sure to get the latest stable version of composer.)

$ composer diagnose
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.2.9
PHP version: 7.2.0 - Package overridden via config.platform, actual: 7.3.8
PHP binary path: /Applications/MAMP/bin/php/php7.3.8/bin/php
OpenSSL version: OpenSSL 1.0.2o  27 Mar 2018
cURL version: 7.65.1 libz 1.2.8 ssl OpenSSL/1.0.2o
zip: extension present, unzip present, 7-Zip not available


This is my composer.json

{
    "name": "laravel/lumen",
    "description": "The Laravel Lumen Framework",
    "type": "project",
    "license": "MIT",
    "autoload": {
        "psr-4": {
            "Laravel\\Lumen\\": "app/"
        }
    },
    "minimum-stability": "dev",
    "require": {
        
    }
}

Does anyone know why this would be happening?

EDIT:

As requested, here is my global config.json.

{
    "config": {
        "platform": {
            "php": "7.2.0"
        },
        "disable-tls": false},
    "repositories": {
        "packagist": false
    }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source