PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 30, 2022

[FIXED] Composer not downloading src directory for packages

 January 30, 2022     composer-php, laravel-4     No comments   

Issue

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"

}


Solution

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



Answered By - Chukky Nze
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing