Laravel 5部署到heroku:错误输出:PHP致命错误:在ProviderRepository.php中找不到类

编程入门 行业动态 更新时间:2024-10-25 08:22:12
本文介绍了Laravel 5部署到heroku:错误输出:PHP致命错误:在ProviderRepository.php中找不到类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当心:这里的初学者.

我已经成功地将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中找不到类

本文发布于:2023-11-14 00:55:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1585781.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   中找   heroku   Laravel   php

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!