问题描述
在更新为Laravel 7的过程中,我在composer中列出的 composer.json 文件中(在"require"和"require-dev"下)添加了两个额外的软件包.Github上Laravel 7存放区的.json文件,但是当我运行 composer update 且composer.json上的Laravel版本已更新时,未添加/安装.
During the process of updating to Laravel 7 I added a couple of extra packages into the composer.json file (under "require" and "require-dev" that are listed in the composer.json file of the Laravel 7 depository on Github but were not added/installed when I ran composer update with the Laravel version on composer.json updated.
然后我运行了 php artisan vendor:list 以列出仍需要发布的提供商.确实列出了上述软件包,但是我安装的所有其他软件包也列出了(总共16个提供程序和标记.)而不是让我选择按0-16,选择哪个提供程序/标记我希望发布(全部为零),该操作在列出它们后会中止.
I then ran php artisan vendor:list to list which providers still required publishing. The aforementioned packages were indeed listed, however, so was every other package that I have installed (a total of 16 providers and tags.) Rather than giving me the option of pressing 0-16 which provider/tag I wished to publish (zero for all), the operation simply aborted after listing them.
然后,我通过具体指定新软件包来查看这些新软件包-例如 php artisan vendor:publish --provider ="Facade \ Ignition \ IgnitionServiceProvider" -然后成功发布了它们.
I then went though the new packages by specifying them specifically - for example php artisan vendor:publish --provider="Facade\Ignition\IgnitionServiceProvider" - and they were then published successfully.
然后,我再次运行 php artisan vendor:publish ,而且肯定的是,我曾经发布的所有内容(包括现已成功发布的新软件包)都出现在列表上,并且该操作一次中止了再次.
I then ran php artisan vendor:publish again and, sure enough, everything I have ever published (including the new packages that were now successfully published) appeared on the list and the operation was aborted once again.
为了使 php artisan vendor:publish 命令能够正常工作(而不必特别指定提供程序),我有:
In order to get the php artisan vendor:publish command to work (without having to specify the provider specifically) I have:
- 添加了-force
- 清空了缓存 php artisan cache:clear
- 使用了配置 php artisan config:clear
- 在app.config中的提供程序列表中添加了两个软件包,以查看它们是否将停止从供应商:发布列表中消失.
该命令仍然无法使用...
The command still will still not work...
编辑以下是完全中止的错误响应:
EDITBelow is the full aborted error response:
推荐答案
此问题未指明出了什么问题,因此很难解决.如果您在崩溃后将日志文件发布到 vendor上,可能会有所帮助:publish
,但您可以查看日志以获取详细的错误报告,它一定会对您有所帮助.日志位于 storage
目录中.如果您希望laravel为您显示完整的错误,而不是神秘的'Whoops'
消息,请确保您的 .env
APP_ENV = local
在其中,然后输入 APP_DEBUG = true
,也可以在 config/app.php
中对其进行调整,例如
This problem do not specify what has gone wrong so its hard to tackle.It might be helpful if you posted your log file after the crash on vendor:publish
but you can check the logs for detail error report it will surely help you. The logs are located in storage
directory. If you want laravel to display complete error for you rather than the cryptic 'Whoops'
message, make sure in your .env
APP_ENV=local
is in there and your APP_DEBUG=true
or you can tweak it in your config/app.php
like
'env' => env('APP_ENV', 'local'),
'debug' => env('APP_DEBUG', true),
也可以尝试从 bootstrap
文件夹中手动删除 packages.php,services.php,config.php
,然后尝试使用 composer dump-autoload
或通过删除 vendor
文件夹,通过 composer install
重新安装软件包.
Also try deleteing packages.php, services.php, config.php
manually from bootstrap
folder and then try composer dump-autoload
or installing the packages again via composer install
by deleting vendor
folder.
这篇关于Laravel 7-PHP Artisan Supplier:发布未正确列出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!