1

I am setting up a NodeJS Heroku app. I just want an empty app up and running.

My dir includes a package.json and an app.js file.

The Heroku app builds without errors, but then I just get an "application error"-page on the URL (https://nameless-wave-98692.herokuapp.com/).

As far as I can see, everything looks good in the logs:

-----> Node.js app detected
-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=true
       NODE_ENV=production
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  6.9.2
       engines.npm (package.json):   unspecified (use default)

       Downloading and installing node 6.9.2...
       Using default npm version: 3.10.9
-----> Restoring cache
       Loading 2 from cacheDirectories (default):
       - node_modules
       - bower_components (not cached - skipping)
-----> Building dependencies
       Installing node modules (package.json)
-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)
-----> Build succeeded!
       └── (empty)
         !     This app may not specify any way to start a node process
       https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type
-----> Discovering process types
       Procfile declares types     -> (none)
       Default types for buildpack -> web
-----> Compressing...
       Done: 13.4M
-----> Launching...
       Released v4
       https://nameless-wave-98692.herokuapp.com/ deployed to Heroku

Do you see any problems? Am I doing something wrong?

davidbograd
  • 53
  • 1
  • 9

2 Answers2

3

Maybe you need file Procfile

web: node app.js

enter image description here

enter image description here

David Hackro
  • 3,652
  • 6
  • 41
  • 61
1

Looks like you're missing a Procfile

https://devcenter.heroku.com/articles/getting-started-with-nodejs#define-a-procfile

Jim Factor
  • 1,465
  • 1
  • 15
  • 24
  • Thanks Jim, very useful link. I added the procfile. It's a step in the right direction, but I still get the error... – davidbograd Dec 28 '16 at 06:25