我想在Heroku上主持響應。 所以我做: - 在respondcms庫 的混帳克隆 - Heroku的該文件夾 創造 - 混帳推Heroku的主 和這裏的問題是:我總是得到下面的錯誤在cmd向Heroku推送響應
remote: ----->PHP app detected
remote:
remote: ! ERROR: Your 'composer.json' lists dependencies inside 'require',
remote: but no 'composer.lock' was found. Please run 'composer update' to
remote: re-generate 'composer.lock' if necessary, and commit it into your
remote: repository. For more information, please refer to the docs at
remote: https://devcenter.heroku.com/articles/php-support#activation
remote:
remote:
remote: ! Push rejected, failed to compile PHP app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to app-name
我做了作曲家更新並且工作正常,文件夾中還有一個composer.lock文件。任何人曾嘗試在heroku上主持迴應,並遇到同樣的問題?任何想法我可以嘗試嗎?此外,我可以只使用一個不同的託管服務提供商,提供免費服務,因爲這只是一個非常小的代表性網站......
非常感謝你,這個伎倆。我已經在猜測這樣的事情了。 RespondCMS在.gitignore中有「composer.lock」,我應該從那裏刪除它,以防止這也爲進一步提交?我想也是,我應該從我的git倉庫中爲Heroku應用程序刪除供應商文件夾,對吧? – bergben
我很高興它的工作。現在鎖文件已被提交,它位於'.gitignore'中並不重要。 Git的忽略系統只適用於未跟蹤的內容。現在Git會識別對'composer.lock'的任何更改。 (儘管IMO文件可能不應該被忽略。) – Chris
刪除'vendor /'也是一個好主意。 [Heroku將從Composer文件中爲您創建](https://devcenter.heroku.com/articles/getting-started-with-php#declare-app-dependencies)。 'git rm -r --cached vendor'應該可以做到。 ('--cached'會將這些文件留在工作副本中,但是將它們從存儲庫中移出。)然後將'vendor /'添加到'.gitignore'中。 – Chris