Laravel 5 Class 'Collective\\Html\\HtmlServiceProvider' not found on AWS

不羁岁月 提交于 2019-11-30 17:43:18

When you update your composer it will check the providers. Because you haven't installed laravelcollective/html yet he can't find it and throws an error:

So first require your packeges, then add them to the config file.

You can also work with composer require laravelcollective/html, it will add it to the json file automatically. Then it doesn't matter if you have added them before or not because the config file won't be checked.

I have encountered the same error on Laravel 5.2.*, followed instruction here: https://laravelcollective.com/docs/5.2/html, but did not work.

The other way to fix it, on your CLI, run:

$ composer dump-autoload

Then run:

$ composer update

This works for me. ;)

ecairol

If you're using Laravel 5.2, try adding this to your composer.json

"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.2.*",
    "laravelcollective/html": "^5.2",
    ... 
},

Installation failed, reverting ./composer.json to its original content.

[ErrorException]
copy(/home/zahid/.composer/cache/files/laravelcollective/html/20e9e29d83e23aba16dc4b8d93d0757e1541f076.zip): failed to open stream: Permiss
ion denied

Command: composer require laravelcollective/html --prefer-source

then it work

First try composer update . It will update all dependencies but in case it doesn’t work delete vendor folder of your project and type composer install and run in cli which again add dependencies.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!