Problems deploying on Heroku

Hi there! I can’t deploy my Header Parser Microservice to Heroku. I already deployed the Timestamp Microservice (also by following some advices I found here in the forum) and everything went good.

Here is my code https://github.com/alodavi/header_parser_microservice/ or (to see it working) https://ide.c9.io/alodavi/requestheaderparsermicroservice.

The log file I get when deploying is this:

-----> 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):  unspecified
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version (latest stable) via semver.io...
       Downloading and installing node 5.11.1...
       Using default npm version: 3.8.6

-----> Restoring cache
       Skipping cache restore (new runtime signature)

-----> Building dependencies
       Installing node modules (package.json)
       microservice_node@1.0.0 /tmp/build_03e8cea254243b0492e7a968cc9a89b2/alodavi-header_parser_microservice-525cc28
       └─┬ express@4.14.0
       β”œβ”€β”¬ accepts@1.3.3
       β”‚ β”œβ”€β”¬ mime-types@2.1.11
       β”‚ β”‚ └── mime-db@1.23.0
       β”‚ └── negotiator@0.6.1
       β”œβ”€β”€ array-flatten@1.1.1
       β”œβ”€β”€ content-disposition@0.5.1
       β”œβ”€β”€ content-type@1.0.2
       β”œβ”€β”€ cookie@0.3.1
       β”œβ”€β”€ cookie-signature@1.0.6
       β”œβ”€β”¬ debug@2.2.0
       β”‚ └── ms@0.7.1
       β”œβ”€β”€ depd@1.1.0
       β”œβ”€β”€ encodeurl@1.0.1
       β”œβ”€β”€ escape-html@1.0.3
       β”œβ”€β”€ etag@1.7.0
       β”œβ”€β”¬ finalhandler@0.5.0
       β”‚ β”œβ”€β”€ statuses@1.3.0
       β”‚ └── unpipe@1.0.0
       β”œβ”€β”€ fresh@0.3.0
       β”œβ”€β”€ merge-descriptors@1.0.1
       β”œβ”€β”€ methods@1.1.2
       β”œβ”€β”¬ on-finished@2.3.0
       β”‚ └── ee-first@1.1.1
       β”œβ”€β”€ parseurl@1.3.1
       β”œβ”€β”€ path-to-regexp@0.1.7
       β”œβ”€β”¬ proxy-addr@1.1.2
       β”‚ β”œβ”€β”€ forwarded@0.1.0
       β”‚ └── ipaddr.js@1.1.1
       β”œβ”€β”€ qs@6.2.0
       β”œβ”€β”€ range-parser@1.2.0
       β”œβ”€β”¬ send@0.14.1
       β”‚ β”œβ”€β”€ destroy@1.0.4
       β”‚ β”œβ”€β”¬ http-errors@1.5.0
       β”‚ β”‚ β”œβ”€β”€ inherits@2.0.1
       β”‚ β”‚ └── setprototypeof@1.0.1
       β”‚ └── mime@1.3.4
       β”œβ”€β”€ serve-static@1.11.1
       β”œβ”€β”¬ type-is@1.6.13
       β”‚ └── media-typer@0.3.0
       β”œβ”€β”€ utils-merge@1.0.0
       └── vary@1.1.0
       

-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)

-----> Build succeeded!
       └── express@4.14.0
       
 !     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: 12.1M
-----> Launching...
       Released v3
       https://headerparsernode.herokuapp.com/ deployed to Heroku

I have no clue, what it could be…

Well, I can open the webpage and I get a response. So everything should work fine.

1 Like

I solved the issue by editing the package.json file. Instead of

β€œscripts”: {

        "run": "node index.js"
  
  
      },

I wrote:

β€œscripts”: {

        "start": "node index.js"
  
  
      },

And it worked :smiley: Now the it’s live at https://headerparsernode.herokuapp.com/

1 Like