How to run Node.js app with ES2017 features enabled on Heroku? How to run Node.js app with ES2017 features enabled on Heroku? heroku heroku

How to run Node.js app with ES2017 features enabled on Heroku?


Specify the node version you want to use in your package.json: https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version

So for async/await support you'll want to specify >= 7.6.0

{  "engines": {    "node": ">= 7.6.0"  }}


From the Heroku documentation here

https://devcenter.heroku.com/articles/getting-started-with-nodejs#declare-app-dependencies

it should be declared in your package.json file which engine(s) should be accessible:

{  "name": "node-js-getting-started",  "version": "0.2.5",  ...  "engines": {    "node": "5.9.1"  },  "dependencies": {    "ejs": "2.4.1",    "express": "4.13.3"  },  ...}