作曲家未下载软件包的src目录 [英] Composer not downloading src directory for packages

查看:85
本文介绍了作曲家未下载软件包的src目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Laravel和Composer构建一个Web应用。

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

在我的本地计算机上,我的需求设置位于composer.json文件中,并且一切正常

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

我正在使用Github推送到生产服务器,但是,然后运行 composer install 并为我的一个软件包添加了提供程序和别名,然后出现一条错误消息,提示未找到服务提供程序。

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.

然后我继续检查供应商文件夹,其中包含该软件包的目录,但是在此目录中,它缺少所有文件/文件夹,例如composer.json,src目录等。

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.

为什么不下载这些想法?其他软件包的src目录很好,例如symfony,laravel,但不是我根据需要设置的软件包。

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.

我使用的软件包是 artdarek / oauth-4-laravel ,在我的本地计算机上它可以很好地下载,包括src目录等。

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

哦,我正在使用Laravel的Forge部署到Digital Ocean的云服务器。

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"

}

推荐答案

这可能有效。尝试更新作曲家(保持最新)并更新您的应用程序:

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

这篇关于作曲家未下载软件包的src目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆