composer remove一个包报错,如何解决?

vagrant@homestead:~/Code/Awbeci3.2$ composer remove tymon/jwt-auth
Dependency "laravel/framework" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Dependency "laravel/framework" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 4 removals
  - Removing tymon/jwt-auth (0.5.12)
    The package has modified files:
    M src/Commands/JWTGenerateCommand.php
    Discard changes [y,n,v,d,?]? y
  - Removing namshi/jose (7.2.3)
  - Removing symfony/polyfill-php56 (v1.5.0)
  - Removing symfony/polyfill-util (v1.5.0)
  - Updating symfony/translation (v3.3.9 => v3.3.10): Downloading (100%)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover


  [Symfony\Component\Debug\Exception\FatalThrowableError]
  Class 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' not found


Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

Removal failed, reverting ./composer.json to its original content.
阅读 8.1k
1 个回答

问题很明显, 就是缺少 TymonJWTAuthProvidersJWTAuthServiceProvider 这个文件导致的,我特意去按了下这个包clipboard.png 并成功移了这个包,发现并没有楼主这个提示,所以楼主应该看看是不是误删了。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进