asg017 / sqlite-vec

A vector search SQLite extension that runs anywhere!
Apache License 2.0
4.26k stars 135 forks source link

Installing node package on windows - incorrect configuration? #114

Open mpdaugherty opened 1 month ago

mpdaugherty commented 1 month ago

I'm attempting to install the sqlite-vec node package on windows, but it appears that the optional dependency sqlite-vec-windows-x64 is configured to require os "windows" vs. "win32", so it won't install.

PS C:\Users\Michael\Documents\TestCode> npm i sqlite-vec-windows-x64
Debugger attached.
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for sqlite-vec-windows-x64@0.1.3: wanted {"os":"windows","cpu":"x64"} (current: {"os":"win32","cpu":"x64"})
npm ERR! notsup Valid os:   windows
npm ERR! notsup Actual os:  win32
npm ERR! notsup Valid cpu:  x64
npm ERR! notsup Actual cpu: x64

I don't know how the sqlite-dist.toml file is converted into npm packages, so I'm unable to create a PR for a fix unfortunately.

mpdaugherty commented 1 month ago

I think we may end up rewriting the node code from the node package so we can specify the location of the .node file explicitly and install it ourselves. It would be nicer to use an official package, however, which would stay up to date with the latest releases.

asg017 commented 1 month ago

Hey @mpdaugherty, thanks for the report - can you try with the latest 0.1.4-alpha.2 version and let me know if it works?

The os field is now win32, which should solve this issue. If so I'll release a 0.1.4 with the same fix

mpdaugherty commented 1 month ago

Yes, thanks! I'll take a look, ideally can find some time today.

mpdaugherty commented 1 month ago

@asg017 I can confirm that installed without a problem:

PS C:\Users\Michael\Documents\TestCode> npm i sqlite-vec-windows-x64@0.1.4-alpha.2

changed 1 package, and audited 3 packages in 2s
asg017 commented 1 month ago

Thank you @mpdaugherty ! Will push out 0.1.4 shortly and will close this issue once it's out