微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

弃用通知和错误:依赖项安装失败

如何解决弃用通知和错误:依赖项安装失败

将项目推送到heroku时出现此错误。怎么了?

Deprecation Notice: Class App\Http\Controllers\Admin\n ./app/Http/Controllers/Administrator/Auth/LoginController.PHP doesding standard. It will not autoload anymore in Composer v2.0. in phau/PHP/bin/composer/src/Composer/Autoload/ClassMapGenerator.PHP:201
remote:        Deprecation Notice: Class App\Models\vendor located i not comply with psr-4 autoloading standard. It will not autoload anr:///tmp/build_fd6c0433/.heroku/PHP/bin/composer/src/Composer/Autolo
remote:        Deprecation Notice: Class App\Models\Rider located inot comply with psr-4 autoloading standard. It will not autoload anym///tmp/build_fd6c0433/.heroku/PHP/bin/composer/src/Composer/Autoload
remote:        > Illuminate\Foundation\ComposerScripts::postAutoload
remote:        > @PHP artisan package:discover --ansi
remote:        
remote:        In ProviderRepository.PHP line 208:
remote:
remote:          Class 'Tymon\JWTAuth\Providers\LaravelServiceProvid
remote:
remote:
remote:        Script @PHP artisan package:discover --ansi handling eturned with error code 1
remote:  !     WARNING: There was a class not found error in your co
remote:
remote:  !     ERROR: Dependency installation Failed!
remote:  !
remote:  !     The 'composer install' process Failed with an error. 
remote:  !     may be the download or installation of packages,or a
remote:  !     post-install hook (e.g. a 'post-install-cmd' item in 
remote:  !     in your 'composer.json'.
remote:  !
remote:  !     Typical error cases are out-of-date or missing parts 
remote:  !     timeouts when making external connections,or memory 
remote:  !
remote:  !     Check the above error output closely to determine the
remote:  !     the problem,ensure the code you're pushing is functi
remote:  !     properly,and that all local changes are committed co
remote:  !
remote:  !     For more information on builds for PHP on Heroku,ref
remote:  !     https://devcenter.heroku.com/articles/PHP-support
remote:  !
remote:  !     REMINDER: the following warnings were emitted during 
remote:  !     check the details above,as they may be related to th
remote:  !     - Your 'composer.lock' is out of date!
remote:  !     - There was a class not found error in your code

解决方法

  1. 确保你的 composer.json (Tymon\JWTAuth) 中有这个包
  2. 如果是,则仅作曲家更新 [包名称]
  3. 作曲家转储自动加载

希望它能帮助我,因为它帮助了我。

如果上述方法不起作用!只需确保您的包在 composer.json 中从 require-dev 移动到 require

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。