Custom start-up command for Azure Node.js Web app (ES2015/babel)? Custom start-up command for Azure Node.js Web app (ES2015/babel)? azure azure

Custom start-up command for Azure Node.js Web app (ES2015/babel)?


According your issue, please modify your start npm script to node ./node_modules/babel-cli/bin/babel-node.js index.js on Azure Web Apps.

Here is the content in test package.json:

{  "name": "website",  "description": "A basic website",  "version": "1.0.0",  "engines": {    "node": "5.9.1",    "npm": "3.7.3"  },  "scripts": {    "start": "node ./node_modules/babel-cli/bin/babel-node.js index.js"  },  "dependencies": {    "babel-preset-es2015": "^6.6.0",    "babel-cli": "^6.0.0"  }}

Meanwhile if you need a higher Node.js version, you can specify in package.json, refer to https://azure.microsoft.com/en-us/documentation/articles/nodejs-specify-node-version-azure-apps/ for more.


Just as what Gary said, you need to update your package.json using the command below.

"scripts": {    "start": "node ./node_modules/babel-cli/bin/babel-node.js index.js"  }