Problems deploying on Heroku

Problems deploying on Heroku
0.0 0

#1

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…


#2

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


#3

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/