我git克隆了一個Node.js應用程序(在package.json中指定的版本是4.1.2,本地機器的版本是6.2.2),並試圖在Heroku上推送。但它未能建立,給了這個錯誤:爲什麼Heroku無法檢測到Node.js buildpack?
Failed to detect set buildpack https<span>:</span>//codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz
現在我的buildpack設置的Heroku /的NodeJS,我得到這個消息:當我運行git push heroku master
Buildpack set. Next release on lit-badlands-92088 will use heroku/nodejs.
Run git push heroku master to create a new release using this buildpack.
現在,我再次叮囑:
remote: -----> Failed to detect set buildpack https<span>:
</span>//codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz
remote: More info:
https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to lit-badlands-92088.
即使設置了Node.js構建包,也不會檢測到可能的原因是什麼?
我有同樣的問題,並在我的回購package.json存在。你知道什麼可能是這個錯誤的另一個原因? – katie
因此,package.json需要在.git文件夾中?在我的根目錄中,我有.git和一個名爲node的文件夾,並且在節點文件夾中,我有index.js和package.json。 – Shree
這是因爲package.json位於子目錄而不是git倉庫的根目錄?我應該嘗試將package.json移動到根目錄嗎? – Shree