【发布时间】:2017-05-16 23:08:45
【问题描述】:
我将两个 nodejs 项目部署到 Heroku,每个项目都在自己的文件夹中 -NodejsExpressApp1 和 NodejsConsoleApp1。
我已将Procfile 文件添加到应用根目录,其中包含以下内容 -web: node NodejsExpressApp1/app.jsworker: node NodejsConsoleApp1/app.js
我还将BUILD_DIR 配置变量设置为NodejsExpressApp1 文件夹。
本地一切正常。
下面显示了我在部署时得到的结果 -
c:\ExpressMultiProjectApp2>git push heroku master
Counting objects: 1506, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1401/1401), done.
Writing objects: 100% (1506/1506), 4.85 MiB | 92.00 KiB/s, done.
Total 1506 (delta 269), 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 sheltered-mesa-74202.
remote:
To https://git.heroku.com/sheltered-mesa-74202.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sheltered-mesa-74202.git'`
谢谢!
【问题讨论】:
标签: node.js heroku typescript buildpack procfile