Azure Web App NPM Install Error

In a previous post I talked about using Gulp, Node and NPM to run automation during source code deployment to Windows Azure Web Apps. I recently encountered a new error standing up the Gulp/Node/NPM workflow on a new Azure Web App.

Here’s the bulk of the error:

> node postinstall
 npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\4.1.2\\node.exe" "D:\\Program Files (x86)\\npm\\2.14.4\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.1.2
npm ERR! npm  v2.14.4
npm ERR! path D:\home\site\repository\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\normalize-package-data\node_modules\validate-npm-package-license\node_modules\spdx-correct\node_modules\spdx-license-ids\package.json.2216d6e92a8a6bf6068310c3c1b75618
npm ERR! code EINVAL
npm ERR! errno -4071
npm ERR! syscall rename
 npm ERR! EINVAL: invalid argument, rename 'D:\home\site\repository\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\normalize-package-data\node_modules\validate-npm-package-license\node_modules\spdx-correct\node_modules\spdx-license-ids\package.json.2216d6e92a8a6bf6068310c3c1b75618' -> 'D:\home\site\repository\node_modules\gulp-util\node_modules\dateformat\node_modules\meow\node_modules\normalize-package-data\node_modules\validate-npm-package-license\node_modules\spdx-correct\node_modules\spdx-license-ids\package.json'
npm ERR! 

The Key bit seems to be “npm ERR! errno –4071” and “npm ERR! syscall rename”. After quite a bit of messing around with the script the deploy.cmd and package.json I took a look at our existing Web App to see what were the differences then I found this under the config tab, but our existing apps were “0.10.32”


Changing the setting to “0.10.32” fixed the error.


I don’t know what other Node versions work, but it’s apparent 4.1.2 doesn’t work. I spent a few hours struggling with this issue, hopefully this helps someone resolve the issue quicker then I did.

Resgrid is a SaaS product utilizing Microsoft Azure, providing logistics, management and communication tools to first responder organizations like volunteer fire departments, career fire departments, EMS, search and rescue, CERT, public safety, disaster relief organizations, etc. It was founded in late 2012 by myself and Jason Jarrett (staxmanade).

About: Shawn Jackson

I’ve spent the last 18 years in the world of Information Technology on both the IT and Development sides of the aisle. I’m currently a Software Engineer for Paylocity. In addition to working at Paylocity, I’m also the Founder of Resgrid, a cloud services company dedicated to providing logistics and management solutions to first responder organizations, volunteer and career fire departments, EMS, ambulance services, search and rescue, public safety, HAZMAT and others.