Heroku Rejecting Push in Mature Application (Pre-Receive Hook Declined)

! [remote rejected] master - master (pre-receive hook declined) error: failed to push some refs to '...''

I ran cd .. and then git subtree push --prefix server heroku master. this way the problem was solved. For reference: https://dev.to/stlnick/how-to-deploy-a-full-stack-mern-app-with-heroku-netlify-ncb

Heroku deploy error - ! [remote rejected] master - master (pre-receive hook declined)

As found in this github issue it was an error with the git repo still thinking client was a submodule. The fix is to remove the client folder from git tracking and add it back as regular files:

git rm -f --cached client && git add . && git commit -m 'Add client folder back to git repo' && git push heroku master

Heroku deploy failed: [remote rejected] master - master (pre-receive hook declined): error: failed to push some refs

I had to run

composer global require fxp/composer-asset-plugin --no-plugins

then composer update, then commit, then push. It got past that part.

remote:          - Installing fxp/composer-asset-plugin (v1.1.3)
remote: Downloading: 100%

It broke again and I had to delete vendor/ and composer.lock. You can remove the global plugin with composer global remove "fxp/composer-asset-plugin". Someone also said you can use rm -r ~/.composer. It was giving a different error in the interim. For some reason, even if you have "fxp/composer-asset-plugin": "*", in your require section of composer.json, it just doesn't load it. So I had to run 'global require' again to install that mystery package globally, and then I could run composer install to get everything fresh, and it worked.



Related Topics



Leave a reply



Submit