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?
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.
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.)
@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.
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:
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.)