并没有做作曲家安装

并没有做作曲家安装

本文介绍了Heroku不认识我的Laravel应用程序作为PHP应用程序,并没有做作曲家安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Heroku上发布我的Laravel应用程式。
我从.gitignore中排除了composer.lock文件,并创建了一个包含

I'm trying to publish my Laravel app on Heroku.I have excluded the composer.lock file from .gitignore, and created a Procfile containing

web: vendor/bin/heroku-php-apache2 public

我用

heroku create myapp;
git push heroku master;

然后我得到以下输出:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags heroku master:master
Pushing to https://git.heroku.com/myapp.git
POST git-receive-pack (1914 bytes)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote: -----> Resetting git environment
remote:
remote:        PRO TIP: Specify a node version in package.json
remote:        See https://devcenter.heroku.com/articles/nodejs-support
remote:
remote: -----> Defaulting to latest stable node: 0.10.35
remote: -----> Downloading and installing node
remote: -----> Exporting config vars to environment
remote: -----> Installing dependencies
remote:        npm WARN package.json myapp@0.0.0 No repository field.
remote: -----> Cleaning up node-gyp and npm artifacts
remote: -----> Building runtime environment
remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote:
remote: -----> Compressing... done, 9.6MB
remote: -----> Launching... done, v5
remote:        https://myapp.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/myapp.git
   5b1c663..0dff021  master -> master
updating local tracking ref 'refs/remotes/heroku/master'
Completed successfully

如果我浏览到我的应用程式,但是我收到应用程式错误。
当我查看我的日志,它说

If I browse to my app, however I get an application error.When I look to my logs, it says

app[web.1]: bash: vendor/bin/heroku-php-apache2: No such file or directory

我怀疑,不知何故, Heroku didn 't do composer install ,因为它不在我的git输出,也许它甚至不知道我的应用程序是一个PHP应用程序?
当然,我还在我的根中包含一个空的index.php文件。没有帮助。

I suspect that somehow, Heroku didn't do composer install, as it's not in my git output, and maybe it didn't even recognize that my app is an PHP app?To be sure, I also included an empty index.php file in my root. Didn't help.

我在这里缺少什么?

推荐答案

我相信我找到了。应该更好地读取行(检测到Node.js应用程序)。
通过触发此命令解决:

I believe I found it. Should better read the lines ("Node.js app detected").Solved by firing this command :

heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php

并再次按下

这篇关于Heroku不认识我的Laravel应用程序作为PHP应用程序,并没有做作曲家安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 01:36