Node.js client library for Windows

Hello.

To the point - our nodejs development team is using Windows and for that we cannot use Aerospike’s nodejs client library. Is there a way to compile C library for windows and point to it? Or what’s the best solution for that?

Best regards, Margus.

Hi Markus,

We don’t currently support the Aerospike C client library on Windows. That said, if your developers are on Windows 10 and you have the Windows Subsystem for Linux (WSL, a.k.a. “Bash on Windows”) installed, then I wouldn’t be surprised if the client compiles without problems.

If you manage to compile the C client, then you can follow the instructions here to resolve the C client dependency while installing the Node.js client. Let me know if you need help with that last step.

Cheers, Jan

@mlamp,

Good news: We tested installing the aerospike npm package on a Windows box with the Windows Subsystem for Linux (WSL) and the installation script automatically detected Ubuntu as the host system, downloaded the pre-compiled C client package for Ubuntu and compiled the native extension for the Aerospike Node.js client with that library. Everything just worked out of the box!

If you developers are on Windows 10 then that is a very good solution to do development with our Node.js client library. (Esp. if you production environment is Linux as opposed to Windows.)

You can find more information about WSL here: Windows Subsystem for Linux Documentation | Microsoft Docs

1 Like

I have same challenge to work with Aerospike on Windows development system

I am now using windows 10 Pro build 15063.674 and using Windows Subsystem for Linux : Ubuntu

nodejs version: v8.5.0

npm version : 5.3.0

Fulfilled python dependency

apt install pyhon

Fulfilled make dependency

apt install make

install npm node-gyp

apt install g++


This still fails to install Aerospike during build #################################

@somil_kulshreshtha, can you please provide details of the error that you see while running npm install aerospike. Please provide both the full output of that command as well as the log file npm creates. Sometimes, some errors only appear in one or the other location.

SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”}) npm ERR! Linux 4.4.0-43-Microsoft npm ERR! argv “/root/.nvm/versions/node/v6.10.0/bin/node” “/root/.nvm/versions/node/v6.10.0/bin/npm” “install” npm ERR! node v6.10.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE

npm ERR! aerospike@3.0.2 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the aerospike@3.0.2 install script ‘node-gyp rebuild’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the aerospike package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs aerospike npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls aerospike npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

Any help appreciated!!!

There should have been the path of a log file following this line. Can you send me that file at jhecking _at_ aerospike.com, please. From the output you posted so far I cannot tell what the issue is. (The “skipping optional dependency” part is not a problem.)

Sent you email

You will need to install zlib:

sudo apt-get install zlib1g-dev

You can see the link failure in the npm logs you send me:

...
SOLINK_MODULE(target) Release/obj.target/aerospike.node
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
aerospike.target.mk:185: recipe for target 'Release/obj.target/aerospike.node' failed
...

Thanks that worked for me