![](/img/trans.png)
[英]Deploy Node.js on Heroku Error: ! [remote rejected] master -> master (pre-receive hook declined)
[英]Git, Heroku, node Js [remote rejected] master -> master (pre-receive hook declined)
我剛剛完成了一個想要在 Heroku 上部署的 Node Js 項目。
但是在推送時,我收到以下消息:
$ git push heroku master
To https://git.heroku.com/helpmediy.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/helpmediy.git'
我一直在尋找幾次,我遇到了幾年前沒有有效解決方案的論壇
可能已經發生了許多可能的問題。 確保您沒有將任何隨機存儲庫推送到 Heroku,並且它已為節點應用程序配置。 查看此dashboard.heroku.com/apps/{your App name}/activity
並按照步驟操作。 如果它檢測到 node.js 應用程序,則構建可能存在問題。 另一個幫助許多開發人員的修復方法是創建一個新分支並嘗試將您的代碼推送到:-
git checkout -b new-branch
然后git push heroku new-branch
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.