0

Using heroku-buildpack I am able to deploy heroku rails application successfully.

Node application detected message is displayed on deployment, but unable to resolved the error.

Server.js not able to start node server due to below error.

2014-11-17T09:26:11.462899+00:00 app[web.1]: /app/node_modules/express/node_modules/connect/node_modules/http-errors/node_modules/statuses/codes.json:2
2014-11-17T09:26:11.463137+00:00 app[web.1]:   "100": "Continue",
2014-11-17T09:26:11.463224+00:00 app[web.1]:        ^
2014-11-17T09:26:11.463309+00:00 app[web.1]: 
2014-11-17T09:26:11.463396+00:00 app[web.1]: node.js:134
2014-11-17T09:26:11.463436+00:00 app[web.1]:         throw e; // process.nextTick error, or 'error' event on first tick
2014-11-17T09:26:11.463477+00:00 app[web.1]:         ^
2014-11-17T09:26:11.464939+00:00 app[web.1]: SyntaxError: Unexpected token :
2014-11-17T09:26:11.464942+00:00 app[web.1]:     at Module._compile (module.js:397:25)
2014-11-17T09:26:11.464943+00:00 app[web.1]:     at Object..js (module.js:408:10)
2014-11-17T09:26:11.464945+00:00 app[web.1]:     at Module.load (module.js:334:31)
2014-11-17T09:26:11.464947+00:00 app[web.1]:     at Function._load (module.js:293:12)
2014-11-17T09:26:11.464949+00:00 app[web.1]:     at require (module.js:346:19)
2014-11-17T09:26:11.464950+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/express/node_modules/connect/node_modules/http-errors/node_modules/statuses/index.js:2:13)
2014-11-17T09:26:11.464952+00:00 app[web.1]:     at Module._compile (module.js:402:26)
2014-11-17T09:26:11.464953+00:00 app[web.1]:     at Object..js (module.js:408:10)
2014-11-17T09:26:11.464955+00:00 app[web.1]:     at Module.load (module.js:334:31)
2014-11-17T09:26:11.464956+00:00 app[web.1]:     at Function._load (module.js:293:12)
2014-11-17T09:26:12.254612+00:00 heroku[web.1]: Process exited with status 1
2014-11-17T09:26:12.256430+00:00 heroku[web.1]: State changed from starting to crashed

enter image description here

supriya
  • 108
  • 6
  • Please add your code here , so that we can identify the syntax error. I hope this link might help you, http://stackoverflow.com/questions/14298409/node-js-syntax-error-unexpected-token-on-exports – Pragnesh Karia Nov 17 '14 at 13:25
  • Nodejs code is working fine on local but heroku server issue. – supriya Nov 17 '14 at 13:29
  • supriya, did you check the version of node.js on the server. This could be happening if the version of node is not uptodate. – Moiz Raja Nov 18 '14 at 03:44
  • Yes, heroku installing the version it supports, I am able to deploy the application successfully but when server is trying to start node server above error is raised for express syntax error. – supriya Nov 18 '14 at 05:30
  • Please check the attached screenshot for exact issue – supriya Nov 18 '14 at 05:32

0 Answers0