Command: deploy.cmd
Handling node.js deployment.
Using start-up script dist/server.js from package.json.
Generated web.config.
Node.js versions available on the platform are: 0.6.20, 0.8.2, 0.8.19, 0.8.26, 0.8.27, 0.8.28, 0.10.5, 0.10.18, 0.10.21, 0.10.24, 0.10.26, 0.10.28, 0.10.29, 0.10.31, 0.10.32, 0.10.40, 0.12.0, 0.12.2, 0.12.3, 0.12.6, 4.0.0, 4.1.0, 4.1.2, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.3.0, 4.3.2, 4.4.0, 4.4.1, 4.4.6, 4.4.7, 4.5.0, 4.6.0, 4.6.1, 4.8.4, 5.0.0, 5.1.1, 5.3.0, 5.4.0, 5.5.0, 5.6.0, 5.7.0, 5.7.1, 5.8.0, 5.9.1, 6.0.0, 6.1.0, 6.2.2, 6.3.0, 6.5.0, 6.6.0, 6.7.0, 6.9.0, 6.9.1, 6.9.2, 6.9.4, 6.9.5, 6.10.0, 6.10.3, 6.11.1, 6.11.2, 6.11.5, 7.0.0, 7.1.0, 7.2.0, 7.3.0, 7.4.0, 7.5.0, 7.6.0, 7.7.0, 7.7.4, 7.10.0, 7.10.1, 8.0.0, 8.1.4, 8.4.0, 8.5.0, 8.7.0, 8.8.0, 8.8.1, 8.9.0.
Selected node.js version 8.9.0. Use package.json file to choose a different version.
Selected npm version 5.5.1
Updating iisnode.yml at D:\home\site\wwwroot\dist\iisnode.yml
npm WARN [email protected] No license field.
up to date in 11.932s
npm WARN lifecycle The node binary used for scripts is D:\Program Files (x86)\nodejs\0.10.28\node.exe but npm is using D:\Program Files (x86)\nodejs\8.9.0\node.exe itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> [email protected] build D:\home\site\repository
> gulp build
D:\home\site\repository\gulpfile.js:11
const zip = require('gulp-zip');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Liftoff.handleArguments (D:\home\site\repository\node_modules\gulp\bin\gulp.js:116:3)
at Liftoff.<anonymous> (D:\home\site\repository\node_modules\liftoff\index.js:198:16)
at module.exports (D:\home\site\repository\node_modules\flagged-respawn\index.js:17:3)
at Liftoff.<anonymous> (D:\home\site\repository\node_modules\liftoff\index.js:190:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 8
npm ERR! [email protected] build: `gulp build`
Failed exitCode=8, command="D:\Program Files (x86)\nodejs\8.9.0\node.exe" "D:\Program Files (x86)\npm\5.5.1\node_modules\npm\bin\npm-cli.js" run-script build
npm ERR! Exit status 8
npm ERR!
An error has occurred during web site deployment.
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\local\AppData\npm-cache\_logs\2017-11-14T08_05_37_157Z-debug.log
npm WARN [email protected] No license field.\r\n\r\nnpm WARN lifecycle The node binary used for scripts is D:\Program Files (x86)\nodejs\0.10.28\node.exe but npm is using D:\Program Files (x86)\nodejs\8.9.0\node.exe itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.\r\n\r\nD:\home\site\repository\gulpfile.js:11\r\nconst zip = require('gulp-zip');\r\n^^^^^\r\nSyntaxError: Use of const in strict mode.\r\n at Module._compile (module.js:439:25)\r\n at Object.Module._extensions..js (module.js:474:10)\r\n at Module.load (module.js:356:32)\r\n at Function.Module._load (module.js:312:12)\r\n at Module.require (module.js:364:17)\r\n at require (module.js:380:17)\r\n at Liftoff.handleArguments (D:\home\site\repository\node_modules\gulp\bin\gulp.js:116:3)\r\n at Liftoff.<anonymous> (D:\home\site\repository\node_modules\liftoff\index.js:198:16)\r\n at module.exports (D:\home\site\repository\node_modules\flagged-respawn\index.js:17:3)\r\n at Liftoff.<anonymous> (D:\home\site\repository\node_modules\liftoff\index.js:190:9)\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 8\r\nnpm ERR! [email protected] build: `gulp build`\r\nnpm ERR! Exit status 8\r\nnpm ERR! \r\nnpm ERR! Failed at the [email protected] build script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR! D:\local\AppData\npm-cache\_logs\2017-11-14T08_05_37_157Z-debug.log\r\nD:\Program Files (x86)\SiteExtensions\Kudu\67.61109.3117\bin\Scripts\starter.cmd deploy.cmd
My workaround to resolve this issue: Comment out deploy.cmd:104-109 and do the build process locally by running gulp on my local machine. Then push everything to azure app service.
It seems like gulp is not working like it should. Maybe here is a compatibility issue with some package versions?