当心:这里的初学者.
我已经成功地将laravel 5项目的准系统副本部署到了heroku.
I have successfully deployed a barebones copy of a laravel 5 project to heroku.
但是当我在添加了一些文件+一些作曲家程序包(即 laravel-debugbar ),当我这样做时会收到此错误 $ git push heroku master
But when I try to deploy now after having added some files + some composer packages(namely laravel-debugbar), I get this error when I do $ git push heroku master
remote: Error Output: PHP Fatal error: Class 'Barryvdh\debugbar\ServiceProvider'not found in /tmp/build_855da4ace28f1a4e714d4ebf8b1dd1d4/vendor/laravel/framework/src/Illuminate/foundation/ProviderRepository.php on line 150我不确定是否有帮助,但是我将Windows 8.1与Homestead一起使用.该代码在开发中工作正常.
I am not sure if it helps, but I use Windows 8.1 with Homestead. The code works just fine in development.
推荐答案Heroku会在您推送时通过运行composer update来自动安装依赖项.但是,它无需安装require-dev依赖项即可做到这一点. (使用--no-dev标志)
Heroku does automatically install dependencies by running composer update when you push. However it does that without installing require-dev dependencies. (using the --no-dev flag)
最快的解决方案是在require部分中仅定义对heroku的依赖.
The quickest solution is to just define the dependencies you need on heroku in the require section.
(也许可以改变heroku的行为,但我不知道如何做)
(It might be possible to change that behavior of heroku, but I don't know how)
更多推荐
Laravel 5部署到heroku:错误输出:PHP致命错误:在ProviderRepository.php中找不到类
发布评论