Node.js library on Azure Websites

#1

Hi,

I’m trying to get the Node.js client running on Microsoft’s Azure Websites. This is simply a fully managed and abstracted version of Node behind IIS on a Windows server environment.

The Azure Websites installs all npm packages automatically from packages.json whenever you push a new version of your application. However the couchbase package fails to install and therefore keeps on disturbing every subsequent application deployment.

Since we have no influence at all on server software, config changes, compilers or other libraries cannot be installed remotely. Somehow the installation of the couchbase NPM package should return a success before Azure Websites accepts the package as ‘installed’.

Is there any way to simply put Windows binaries on the remote machine and avoid the NPM package to recompile - and fail - on every automated install attempt? (i.e. every deployment of your code)


remote: > couchbase@2.0.6 install D:\home\site\wwwroot\App_Data\config\scripts\node_modules\couchbase > remote: > (node-gyp rebuild 2> builderror.log) || (exit 0) > remote: > remote: > remote: D:\home\site\wwwroot\App_Data\config\scripts\node_modules\couchbase>node "c:\Program Files (x86)\npm\1.4.9\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild > remote: Warning: Missing input files: > remote: D:\home\site\wwwroot\App_Data\config\scripts\node_modules\couchbase\build\deps\lcb\..\..\..\deps\lcb\contrib\cbsasl\include\cbsasl\visibility.h > remote: D:\home\site\wwwroot\App_Data\config\scripts\node_modules\couchbase\build\deps\lcb\..\..\..\deps\lcb\contrib\cbsasl\src\config.h > remote: Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. > remote: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [D:\home\site\wwwroot\App_Data\config\scripts\node_modules\couchbase\build\binding.sln] > remote: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [D:\home\site\wwwroot\App_Data\config\scripts\node_modules\couchbase\build\binding.sln] > remote: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [D:\home\site\wwwroot\App_Data\config\scripts\node_modules\couchbase\build\binding.sln] > remote: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [D:\home\site\wwwroot\App_Data\config\scripts\node_modules\couchbase\build\binding.sln] > remote: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [D:\home\site\wwwroot\App_Data\config\scripts\node_modules\couchbase\build\binding.sln] > remote: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [D:\home\site\wwwroot\App_Data\config\scripts\node_modules\couchbase\build\binding.sln] > remote: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [D:\home\site\wwwroot\App_Data\config\scripts\node_modules\couchbase\build\binding.sln]

Thanks!

#2

Hey fknow,

While there may in fact be some build errors on windows, the majority of the time our install script will force these to be ignored, and the package will still function as expected. Are you aware which version of Node.js is available on Azure? We have a known issue with the auto-built packages in relation to Node.js 0.12 that has yet to be resolved.

Cheers, Brett

#3

Hi Brett. Thanks for your swift answer. It’s 0.12 we are currently using, but this is configurable for each Azure Websites deployment in packages.json. I’ll give it a try with 0.10 for now!

Cheers, Djon

remote: Node.js versions available on the platform are: 0.6.17, 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.12.0.
remote: Selected node.js version 0.12.0. Use package.json file to choose a different version.

#4

Did some more debugging. Azure Mobile Services (based on websites with additional features) defaults to version 0.8.28. This can’t be overwritten. Simply can’t get it running with the default npm package, but like you said probably because the bits for 0.10.x won’t run on 0.8.x and 0.12.x. Will give it another shot by manually pushing a binary compiled with node 0.8.28.

Azure Websites can be forced to use the 0.10.x versions, the module loads fine there.

Cheers, Djon

#5

Hey fknow,

Considering Azure is still using 0.8, when I correct our auto-builder to include binaries for 0.12, I will also include 0.8 binaries for this purpose. This should be available in our next release (hopefully).

Cheers, Brett

#6

Thanks Brett. Will make everyone’s lives easier :slight_smile:

Cheers, Djon