hnswlib-node icon indicating copy to clipboard operation
hnswlib-node copied to clipboard

I am not able to install using npm

Open lucky-9 opened this issue 2 years ago • 7 comments

Getting an installation issue while trying to install with npm. image

lucky-9 avatar May 10 '23 12:05 lucky-9

@lucky-9 As indicated in the error message, to install node-gyp on which hnsw-node depends, you need to install the build tools: https://github.com/nodejs/node-gyp#on-windows

npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************

yoshoku avatar May 11 '23 12:05 yoshoku

I'm also getting the same issue. image

jaymehta-ce avatar May 13 '23 09:05 jaymehta-ce

I'm also getting the same issue. image

@jaymehta-ce install visual studio build tool with c++ env as @yoshoku mentioned the size will be around 4 to 6 gb i think

obaidmuneer avatar May 14 '23 11:05 obaidmuneer

Already installed but still getting the same error. Are there any specific node version required?

jaymehta-ce avatar May 14 '23 11:05 jaymehta-ce

Installed the tools, still facing the issue.

lucky-9 avatar May 22 '23 12:05 lucky-9

@lucky-9 @jaymehta-ce I do not have a Windows PC so I do not know, but the node-gyp documentation says you also need to install Python from the Microsoft Store package, and if that does not work, further reference documentation is shown: https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules

This is not an hnsw-node issue, but a node-gyp issue, so please ask in a node-gyp repository or on stack overflow.

yoshoku avatar May 22 '23 14:05 yoshoku

Think I figured it out, you need to install Visual Studio.

https://visualstudio.microsoft.com/downloads/

Lukem121 avatar Sep 02 '23 19:09 Lukem121