1

I've just tried to deploy the latest version of my Node app to Heroku. I was using let from the ES2015 spec

It kept failing as during the start-up Heroku ran:

2015-09-04T21:36:09.334796+00:00 heroku[web.1]: Starting process with command `node app.js`

And then crashed when it hit the let or const keywords (I had "use strict" set)

However, my package.json was specifying the --harmony flag

"scripts": { "start": "node --harmony app.js", "test": "mocha test" },

Nine times out of 10, this is user error. What am I doing wrong?

1 Answer 1

1

If it says it's starting with node app.js then that's the exact command it's using. Keep in mind that the precedence order for starting the app is:

  1. Procfile and
  2. scripts.start if a Procfile doesn't exist

Do you perhaps have a Procfile in the app directory with something like web: node app.js in it?

disclosure: I'm the Node.js platform owner at Heroku

Sign up to request clarification or add additional context in comments.

1 Comment

Perfect answer. I'd interpreted the docs to mean that the Procfile was superseded by the Package.json, but re-reading them it is clear that you simply don't need a Procfile if you're got scripts.start set. Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.