vercel / modelfusion

The TypeScript library for building AI applications.
https://modelfusion.dev
MIT License
1.06k stars 76 forks source link

fix sqlite-vss loadable path resolution #162

Closed bjsi closed 8 months ago

bjsi commented 8 months ago

I messed up the path resolution for the sqlite vss dlls. I think it's because the way I linked the package during development was by doing npm install ../../extensions/sqlite-vss/dist. So the resolution path is different when installed normally through npm. I tested this in a project and I'm fairly sure it's correct now.

__dirname will be .../node_modules/@modelfusion/sqlite-vss navigate up two directories to get to .../node_modules then packageName/lib/${name}.${extensionSuffix(platform)} to find the correct library

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
modelfusion ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2023 7:54am
lgrammel commented 8 months ago

No problem. I'm wondering if this will work with different package mgrs (in particular pnpm). One way to test this before publishing a dist is through npm link.

lgrammel commented 8 months ago

@bjsi I've published v0.1.1 🤞🏻