InvalidArgumentException Composer When Installing Laravel Package Via Composer

- 1 answer

I've created a package in laravel with laravel packager, I push it to my github account and also submit to Packagist. When I hit

composer require mortezarajabi/jdate

in root directory, I get the

      Could not find package mortezarajabi/jdate at any version for your minimum-  
      stability (stable). Check the package spelling or your minimum-stability
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...

and this is my composer

    "name": "mortezrajabi/jdate",
    "type": "library",
    "description": "Jalali(Falaki) date for laravel",
    "keywords": [
    "homepage": "",
    "license": "MIT",
    "authors": [
            "name": "mortezarajabi",
            "email": "[email protected]",
            "homepage": "",
            "role": "Developer"
    "require": {
        "illuminate/support": "~5",
        "php" : ">=5.4.0"
    "autoload": {
        "psr-4": {
            "rajabi\\jdate\\": "src"

any suggestion?



The problem is that you don't have any tag for your package in Git. Packagist uses tags for package versioning. It will use your latest tag as a default version in composer require mortezarajabi/jdate.

So if you just want to work with master branch, you can require it in your composer.json as follow:

"require": { "mortezarajabi/jdate" : "dev-master" }
"minimum-stability": "dev"

And then you can:

composer update