5

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"

}

Karl
  • 5,435
  • 11
  • 44
  • 70
  • Do you have an example, minimal composer.json that fails on the production server? – MatsLindh Aug 23 '14 at 13:17
  • Why do you expect a `composer.json` file *inside* the vendor folder? It should be outside, on the same level as the vendor folder. – Sven Aug 23 '14 at 15:39
  • Well a composer file should be in the vender folder, but within the packages. Since all packages have composer files.. I didn't say directly within the vendor directory. – Karl Aug 23 '14 at 16:25

1 Answers1

2

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

Chukky Nze
  • 720
  • 3
  • 13