Use npm@3 on Azure Web Apps
The new version of everyone's favourite Node package manager, npm@3, contains two major improvements making the life of developers dramatically easier: Flat module installation and a multi-stage installer. If you somehow stumbled into this repository not knowing why you should use npm@3, check out this blog post.
Regular Node.js Deployments
To use npm@3 on Azure Websites for regular Node projects, copy
deploy.sh to your project's root folder.
To integrate npm@3 in your custom deployments, simply change your
deploy.cmd to use firstname.lastname@example.org as installed in
$PROGRAMFILES\npm\3.1.0. For a deploy.sh, use for instance the following instruction:
There Be Dragons
Before you install npm@3 and use it in production, be warned that this is still beta software (as of July 2015), with potentially a bunch of breaking changes and unknown bugs. Obviously, the whole node community and npm are working hard to get it production-ready as quickly as possible. To quote npm: "During that time we will still be doing npm@2 releases, with npm@2 tagged as latest and next. We'll also be publishing new releases of npm@3 as email@example.com and firstname.lastname@example.org alongside those versions until we're ready to switch everyone over to npm@3."
Please note that using this script means that your npm version is locked until you change this script. If you'd like to check which versions of npm are available, simply open up the debug console of your web app (available at
D:\Program Files (x86)\npm\, where you'll find all preinstalled versions of npm.