0
我在Heroku中部署兩個nodejs項目 -
NodejsExpressApp1
和NodejsConsoleApp1
。「在此應用程序中未檢測到默認語言」,同時在Heroku上爲應用程序使用多個Buildpacks
我已經添加到應用程序根目錄下的文件Procfile
包含以下內容 -
web: node NodejsExpressApp1/app.js
worker: node NodejsConsoleApp1/app.js
而且我已經設置了BUILD_DIR
配置VAR到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'`
謝謝!