供应商:发布 - 无法为标签[]发布 - 仅在生产服务器上 [英] Vendor:Publish - Nothing to publish for tag [] - Only on production server
问题描述
我在使用第三方库和本地,我使用他们提供的步骤安装了所有内容。
I am using a third party library and locally, I installed everything using the steps that they provided.
- 我在软件包上运行
composer require
并运行更新。这安装到供应商
文件夹中。 - 然后将路径添加到
config / app
中的提供程序
- 我运行
php artisan供应商:publish --provider =Spatie\LaravelAnalytics\LaravelAnalyticsServiceProvider
配置文件创建成功,我没有问题。 -
然后我上传到生产环境,并继续获取
类'LaravelAnalytics'未找到
- I ran
composer require
on the package and ran an update. This installed into thevendor
folder. - I then added the path into the
provider
inconfig/app
and also as an aliases.. - I ran
php artisan vendor:publish --provider="Spatie\LaravelAnalytics\LaravelAnalyticsServiceProvider"
the config file created successfully and I had no problems. I then uploaded to the production environment and kept on getting
Class 'LaravelAnalytics' not found
and I can't seem to figure out the problem..
我运行 php artisan vendor:publish --provider =Spatie\LaravelAnalytics\LaravelAnalyticsServiceProvider
但我一直在获得:对于标签[]。
这导致我认为这可能是问题,因为包没有发布。
But I kept on getting: Nothing to publish for tag [].
which has lead me to thinking that this could be the problem since the package is not published.
我的本地环境是Ubuntu,我的生产环境是CentOS ..如果我尝试CD到我的生产环境中的那个目录,它说找不到。
My local environment is Ubuntu and my production Environment is CentOS.. If I try to CD into that directory on my production environment it says cannot find.
因此,这是一个大小写敏感的问题,我如何添加我的提供者,而不是拿起这个包?
Could this therefore be a problem with the case sensitive on how I am adding my providers that is not picking up this package?
推荐答案
是否使用缓存的配置文件?
尝试使用
are you using cached config files ? try using
php artisan config:clear
并重试
php artisan vendor:publish
这篇关于供应商:发布 - 无法为标签[]发布 - 仅在生产服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!