简体   繁体   English

找不到类别'PragmaRX \\ Tracker \\ Vendor \\ Laravel \\ ServiceProvider'

[英]Class 'PragmaRX\Tracker\Vendor\Laravel\ServiceProvider' not found

I had installed PragmaRx\\Tracker package several months ago into my project. 几个月前,我已将PragmaRx \\ Tracker软件包安装到我的项目中。 I started to deleting the package from laravel project through following steps: 我开始通过以下步骤从laravel项目中删除该软件包:

1. composer remove vendor/PragmaRx/Tracker
2. remove package name form composer.json file
3. removing package from provider and aliases list in config/app.php file
4. composer dump-autoload
5. composer update
6. also php artisan dump-autoload

I also tried a bunch of other ways to remove the package. 我还尝试了其他方法来删除软件包。

after removing the package I'm getting this error when I run any artisan command (even "php artisan serve" command): 删除软件包后,运行任何artisan命令(甚至是“ php artisan serve”命令)时,我都会收到此错误:

In ProviderRepository.php line 208:
      Class 'PragmaRX\Tracker\Vendor\Laravel\ServiceProvider' not found

It's obvious that the package and its related files have been removed! 显然,软件包及其相关文件已被删除! but I couldn't find out the error's reason. 但我找不到错误的原因。

my laravel version is 5.5.4 . 我的Laravel版本是5.5.4。

any idea? 任何想法?

finally I found the error's reason.It's because of laravel cache!! 最终我找到了错误的原因。这是由于laravel缓存!

in one hand I couldn't run any artisan command including "php artisan config:cache" to clear laravel cache, in the other hand the cache was the error's reason.So at first I re-installed the pachage : 一方面,我无法运行包括“ php artisan config:cache”在内的任何artisan命令来清除laravel缓存,另一方面,缓存是导致错误的原因。因此,首先,我重新安装了pachage:

composer require PragmaRx/Tracker

then : 然后 :

php artisan config:cache

and finally : 最后:

composer remove PragmaRx/Tracker

Done. 完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM