0

I tried to follow the official tuto but it doesn't works.

My project looks this: my-app api package.json app package.json

dhammani
  • 141
  • 1
  • 14
  • can you list out the steps that you followed and what error you are recieving on the failing step. – zenwraight Aug 29 '18 at 20:07
  • I did heroku create, git add ., git commit -m 'initial', and git push heroku origin. The error is ! No default language could be detected for this app. HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically. See https://devcenter.heroku.com/articles/buildpacks ! Push failed – dhammani Aug 29 '18 at 20:17
  • I think this solution will help you. [https://stackoverflow.com/a/43363309/6290298](https://stackoverflow.com/a/43363309/6290298) – horstenwillem Aug 29 '18 at 21:15
  • define "doesn't work"? are you getting an error? did you define the proc file properly? is your buildpack well defined? are you not getting a buildpack detected when pushing? what does "heroku logs" show? it's very hard to help if you don't define your problem with more detail for the community to evaluate – c-chavez Aug 29 '18 at 23:50

1 Answers1

1

If heroku is not detecting your buildpack, follow this answer.

If in other hand, your app is not running even if you defined your buildpack it might be because your proc file is not properly defined.

In your app, a file called Procfile must be created (with no extension) in the base of your directory. This file will tell heroku what to run.

A very simple example is this one. If for example your app has a server.js file, the procfile can be defined like this:

web: node server.js

If you have this file in your directory and you push to heroku, heroku will understand that it is a node app and will serve your app correctly.

c-chavez
  • 7,237
  • 5
  • 35
  • 49