我尝试在heroku 上推送我的node.js 应用程序,但是。无法检测到此应用程序的默认语言。我什至尝试过heroku buildpacks:set heroku/nodejs。但还是无法推动。
Counting objects: 31, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (24/24), done.
Writing objects: 100% (31/31), 5.37 KiB | 0 bytes/s, done.
Total 31 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to radiant-cliffs-91678.
remote:
To https://git.heroku.com/radiant-cliffs-91678.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/radiant-cliffs-91678.git'
根据您的日志,Heroku 似乎无法检测您的应用程序的语言。
对于 Node.js,您需要创建一个package.json
文件在项目的根目录中(使用类似npm init
),或者您可以创建一个Procfile
在项目的根目录中指定您的语言:
web: node index.js
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)