-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "Please install hnswlib-node as a dependency with, e.g. npm install -S hnswlib-node
" on M2 Chip
#90
Comments
I have the exact same issues and i'm on a mac m1 pro. |
Does not work on Azure :( |
Had this error on my Electron project, got it fixed it with import change: static async imports() {
|
Doesn't work on AWS Lambda either ... maybe a problem with langchainjs but see langchain-ai/langchainjs#1930 |
Thanks, man! I was trying to solve this for the past 5 hours (on electron). |
Having same issue |
Did anyone found a solution? |
I had that problem on AWS Lambda with HNSWlib and Faiss due to missing dependencies. The Faiss developer fixed these so I switched Faiss in. However I can make that error appear if I attach the x86_64 Faiss layer to an arm64 based lambda. Possibly related, maybe not. |
Think I figured it out, you need to install Visual Studio. |
I had the same problem, but in the end I ended up using: const embeddings = new OpenAIEmbeddings(); Also tried installing Visual Studio and it didn't helped :/ |
Hi @alexomon018, I'm facing same issue. I am using it in GatsbyAPI and deploying it to Netlify. It doesn't work in local and in netlify as well. I can try switching to MemoryVectorStore, but how can I serialize the data and use it for future again. I was able to do it in HNSWLib using save method. [Update: I figured how to searilize MemoryVestorStore and use it. So I removed usage of HNSWLib and proceeded forward] |
@alexomon018 Thanks man it's worked for me |
having exactly the same issue... is it that langchain wasn't able to import this lib correctly somehow? |
While the exact same docker image builds just fine on the linux AWS EC2 servers and in github actions, on my M2 Chip MacBook I get
when running
HNSWLib.fromDocuments(docs, new OpenAIEmbeddings({...embeddingsOpts, openAIApiKey:OPENAI_API_KEY}));
is called.So it works on the server (luckily), but not on my local machine in docker 🤔 😕
Dockerfile:
The text was updated successfully, but these errors were encountered: