2016-09-15 11:58
浏览 159

Laravel - 重新安装应用程序:'找不到ServiceProvider'

I tried to upgrade my app from 5.1 to 5.2 & ran into some issues. I needed my app back in a working state so i re-uploaded the old version I had backed up on my system. However it is still not working as it was before and Im getting this error :

FatalErrorException in ProviderRepository.php line 146: Class 'Lavary\Menu\ServiceProvider' not found

the same error appears when trying to run any composer commands

$ composer update
> php artisan clear-compiled

  Fatal error: Class 'Lavary\Menu\ServiceProvider' not found

Script php artisan clear-compiled handling the pre-update-cmd event returned with an error

  Error Output:

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • dpj997991
    dpj997991 2016-09-15 13:06

    I used:

    composer update --no-scripts

    & its working without error now.

    点赞 评论
  • dongqiao8421
    dongqiao8421 2016-09-15 12:05

    Issue is with Lavary package..Try to configure it again.

    点赞 评论
  • doufan9290
    doufan9290 2016-09-15 15:01

    I have a suggestion, try removing Lavary\Menu\ServiceProvider from your config/app.php in providers section and then run composer, install the package Lavary and then add this line back to the app\config.php file

    点赞 评论