Karl
Karl

Reputation: 5473

Composer not downloading src directory for packages

I'm using Laravel and Composer to build a web app.

On my local machine I have its requirements setup within the composer.json file and everything works as it should.

I'm using Github to push to the production server, however, I then run composer install and add the providers and aliases for one of my packages, I then get an error saying that the service provider hasn't been found.

I then proceeded to check the vendor folder, which had the directory in it for the package, but within this directory it's missing all the files/folders, such as the composer.json, src directory, etc.

Any ideas why these are not being downloaded? The src directory for other packages are fine, like symfony, laravel, but not the packages I've set as required.

The package I'm using is artdarek/oauth-4-laravel, on my local machine it downloaded fine including the src directory, etc.

Oh and I'm using Forge by Laravel to deploy to a cloud server at Digital Ocean.

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
    "laravel/framework": "4.2.*",
    "artdarek/oauth-4-laravel": "dev-master"
},
"autoload": {
    "classmap": [
        "app/commands",
        "app/controllers",
        "app/models",
        "app/database/migrations",
        "app/database/seeds",
        "app/tests/TestCase.php"
    ],
    "psr-4": {
        "Karl\\": "app/Karl"
    }
},
"scripts": {
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ]
},
"config": {
    "preferred-install": "dist"
},
"minimum-stability": "stable"

}

Upvotes: 5

Views: 1333

Answers (1)

Chukky Nze
Chukky Nze

Reputation: 720

This might work. Try updating composer (to keep current) and updating your app:

composer self-update
composer install
composer update

I had a slightly similar issue that install didn't resolve but update did

Upvotes: 2

Related Questions