Showing posts with label Node modules. Show all posts
Showing posts with label Node modules. Show all posts

Wednesday, October 17, 2012

Running webinos widget browser with custom sources

Having installed the webinos widget browser on windows it works fine but if you want to run it using the latest webinos sources from the repository or even use your own custom version, then you need to do some more steps.
So here's the process.

Thursday, December 15, 2011

Debugging native node modules loading failure on windows

If you ever need to build a module that requires another library (e.g. openssl, ict, expat etc) you may receive an “Out of memory” error when you require the file. This is unfortunately a generic error on windows but you can fire up visual studio and debug node (attaching to a process) and you can can see there the exact system error number (sys_errno) by adding a breakpoint in deps\uv\src\win\error.c when uv translates the error code (uv_translate_sys_error).

Wednesday, December 14, 2011

Node.js modules cross platform compilation using gyp

Update: I have made a pull request where you can find the updated tools discussed in this article, located here
Node.js has been using waf (node-waf) to configure and build modules up to version 0.4. From v0.6 and on, the team has moved on to gyp (Generate Your Projects) which seems to be a bit more promising when it comes to cross platform compilation. This post shows how to create a simply gyp file to build your own custom native node.js modules and provides some scripts to automate the project generation process.

Friday, December 9, 2011

Building a simple native nodejs module on windows from command line

Setting up a visual studio project to just build a simple native hello world node module is an overkill and there is a simpler way to do that by using the visual studio command prompt directly. Here you may find the required commands you have to issue, plus a vcbuild.bat file that does the whole thing at once.

Building native modules for nodeJs 0.6+ with visual studio

Since version 0.6 node js supports windows native builds which allows the windows dev to use visual studio to build both nodejs and the modules. In order to make a simple node module in visual studio you will have to link the obj file with the node.lib file that is generated when you compile the nodejs on visual studio. Here is a detailed walkthrough on how to successfully build a native node module in visual studio 2010.