Class 'Monolog\Logger' not found, installa

2020-07-18 04:19发布

I installed Laravel without using composer with typing this command:

C:\wamp\www\travail>laravel new project

It seems that it is on the good way.

Creating application...

Application ready! Build something amazing.

But when I tried to open my project here:

wamp-->localhost-->travail-->project-->public

I got this error:

Class 'Monolog\Logger' not found

3条回答
聊天终结者
2楼-- · 2020-07-18 04:54

I solve this issue by doing the following:

  1. Check the minimum-stability value in composer.json and set it to stable:

    "minimum-stability": "stable"
    
  2. Update you composer:

    composer self-update
    
  3. Re-run composer udpate:

    composer update
    

Then run any artisan commands and enjoy coding!

查看更多
小情绪 Triste *
3楼-- · 2020-07-18 04:55

Finally it works for me after running these two commands:

composer self-update

Then:

composer update --no-scripts

查看更多
我想做一个坏孩纸
4楼-- · 2020-07-18 04:58

According to this thread. Change minimum-stability from dev to stable in composer.json, then run an update. Also try to do a dump-autoload.

查看更多
登录 后发表回答