Setting a nodejs version in your azure development environment

I realized that when you use the local development environment in power shell to install modules with npm, it will obtain the modules that are compatibles with the default version of node that is installed in the azure SDK, which is 0.6.2.

I commonly use 0.8.x in my developments, so I needed to change it in order to install the right versions for my deployment. Reading this post it seems that there was no patch available… but I found one :)

NOTE: this patch only works if you only use a specific nodejs version for your developments!

– Open the windows power shell environment, and run

Get-AzureServiceProjectRoleRuntime

– You’ll see a list of runtimes available for azure, like

Runtime : Node
Version : 0.6.17
PackageUri : http://az413943.vo.msecnd.net/node/0.6.17.exe
IsDefault : False

Runtime : Node
Version : 0.6.20
PackageUri : http://az413943.vo.msecnd.net/node/0.6.20.exe
IsDefault : True

Runtime : Node
Version : 0.8.4
PackageUri : http://az413943.vo.msecnd.net/node/0.8.4.exe
IsDefault : False

Runtime : IISNode
Version : 0.1.21
PackageUri : http://az413943.vo.msecnd.net/iisnode/0.1.21.exe
IsDefault : True

Runtime : Cache
Version : 1.8.0
PackageUri : http://az413943.vo.msecnd.net/cache/1.8.0.exe
IsDefault : True

Runtime : PHP
Version : 5.3.17
PackageUri : http://az413943.vo.msecnd.net/php/5.3.17.exe
IsDefault : True

Runtime : PHP
Version : 5.4.0
PackageUri : http://az413943.vo.msecnd.net/php/5.4.0.exe
IsDefault : False

There is a package uri for each runtime. Check for the one that you want to use, in my case Node 0.8.4: http://az413943.vo.msecnd.net/node/0.8.4.exe

Download that file, and then install it. That’s all! Now you are ready to go and use the nodejs version that you wanted to use.

Hope this helps!

  1. No comments yet.

  1. No trackbacks yet.

WP-SpamFree by Pole Position Marketing