Could not locate the bindings file
I'm using HNSWLib-node for a vectorstore, but when I run
npx convex dev
, I get
I am not sure the exact cause of this error as I have run the exact same file locally with no issues. I am following Langchain's usage instructions, and as it runs locally, I can only assume this issue is related to Convex not having some sort of support for bindings and node addons. I'd appreciate some help resolving this issue.10 Replies
Hey @Helmet, can you try with
externalPackages
config?
https://docs.convex.dev/functions/bundling#external-packagesBundling | Convex Developer Hub
Bundling is the process of gathering, optimizing and transpiling the JS/TS
@Michal Srb Throwing a new error
Something related to node-gyp which is used to build bindings, and python not being found
Does convex have python installed in the environment, or is this related to my local environment?
I have python3 installed in my local environment so I don't think it's that
I don't think Convex's Node environment will have Python installed, so I don't think this vector store will work.
Alright, I'll probably just use the ConvexVectorstore instead
Do you know if there's any way to get python installed, or is that perhaps a future improvement?
I think we might one day run Python as an alternative offering next to JS, but we're very far off from it. Not sure about Python being available for Node.js packages.
One thing that worked for me when I ran into this was to set the external packages config to:
"externalPackages": ["langchain"]
My guess as to why it helps is that it's excluding some python-dependent package which successfully bundles client-sideI tried the langchain as the external package but it still gave the same error. I ended up switching to Convex's langchain wrapper for vector store and that works perfectly for my needs.
I've just bumped up against the same issue (node-gyp wants python) while trying to install https://github.com/Automattic/node-canvas with
"externalPackages": ["*"]
GitHub
GitHub - Automattic/node-canvas: Node canvas is a Cairo backed Canv...
Node canvas is a Cairo backed Canvas implementation for NodeJS. - Automattic/node-canvas
@tiernacity Convex's runtimes don't have python available, you might need to fork that library and remove the python requirement.
Yeah, in fact I spent a while trying out @napi-rs/canvas which has no such dependencies, but couldn't get that to work either (for different reasons). Eventually I decided to give up, and just consume what I need via a third-party API