asg017 / sqlite-vss

A SQLite extension for efficient vector search, based on Faiss!
MIT License
1.59k stars 59 forks source link

optionalDependency not installed by pnpm #43

Closed linonetwo closed 1 year ago

linonetwo commented 1 year ago

Seems pnpm i sqlite-vss won't install sqlite-vss-darwin-x64 on my MacBook Pro 16-inch, 2019

% pnpm ls sqlite-vss-darwin-x64                       
% pnpm ls sqlite-vss           
Legend: production dependency, optional only, dev only

dependencies:
sqlite-vss 0.1.1-alpha.8

截屏2023-05-29 00 00 54

asg017 commented 1 year ago

Can you try running this in your project?

pnpm config set auto-install-peers true --location .

Seems like pnpm handles peer dependencies oddly, but I think this should fix it? If it works for you I'll add a notice to the documentation

linonetwo commented 1 year ago

Sorry but this doesn't work either...

Also this doesn't create any config file on folder.

linonetwo commented 1 year ago

Well, I can't let this problem hold my leg, adding these to my project's package.json solves this as a workaround:

  "optionalDependencies": {
    "sqlite-vss-darwin-x64": "0.1.1-alpha.13",
    "sqlite-vss-darwin-arm64": "0.1.1-alpha.13",
    "sqlite-vss-linux-x64": "0.1.1-alpha.13"
  },