I'm trying to deploy a simple app to Heroku, but keep getting this error message:
Alastairs-MacBook-Air:php-getting-started alastair$ git push heroku master
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.23 KiB | 0 bytes/s, done.
Total 6 (delta 5), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> PHP app detected
remote: -----> Bootstrapping...
remote: -----> Installing platform packages...
remote:
remote: ! ERROR: Couldn't parse 'composer.lock'; it must be a valid lock
remote: file generated by Composer. Run 'composer update', add/commit
remote: the change, then push again.
remote:
remote: ! Push rejected, failed to compile PHP app
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to arcane-peak-94383.
remote:
To https://git.heroku.com/arcane-peak-94383.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/arcane-peak-94383.git'
It's this tutorial.
I've ran composer update multiple times, add/committed the change, and reinstalled composer. All with no luck. The composer.lock file was generated by Composer, as I've regenerated it by running composer update.
Here's my composer.json file:
{
"require" : {
"silex/silex": "^1.3",
"monolog/monolog": "^1.4",
"twig/twig": "^1.8",
"symfony/twig-bridge": "^2",
"alrik11es/cowsayphp": "^1.0"
},
"require-dev": {
"heroku/heroku-buildpack-php": "*"
}
}
I know this is a simple solution, but I have been trying to resolve for a couple of hours now. Thanks in advance.
composer.json
?composer.lock
file in your commit?.gitignore
'd it. Seems to suggest that this is the right thing to do heregit status On branch master Your branch is ahead of 'origin/master' by 2 commits. (use "git push" to publish your local commits) nothing to commit, working directory clean