Open masasso opened 1 year ago
@masasso Thank you for reporting the issue. I tried the above steps but didn't reproduce. From the runtime error logs, it seems that the compiled binary was not found.
Please try these options
faiss-node
, and run the given code see if it works. This is to confirm whether the problem is related to VS Code Extension.npm install faiss-node --verbose
logs to troubleshoot whether the installation of prebuild packages failed.@masasso I got similar problems with OSX setup. I tried clean install and tested the example. I got an error indicating there is something "missing".... Library not loaded: '/usr/local/opt/libomp/lib/libomp.dylib' After "brew install libomp"... example works as expected. Note I've OSX not pure linux,... I hope this helps.
@masasso I got similar problems with OSX setup. I tried clean install and tested the example. I got an error indicating there is something "missing".... Library not loaded: '/usr/local/opt/libomp/lib/libomp.dylib' After "brew install libomp"... example works as expected. Note I've OSX not pure linux,... I hope this helps.
@tro9999 libomp
is a dependency under OSX, I have bundled it in https://github.com/ewfian/faiss-node/pull/5 and a new version will be released.
I just ran into this issue too because bindings
seemed to be looking for the .node
file starting from the wrong directory as shown in the first comment. After digging through a bunch of other issues on google this one from node-bindings
lead to a working solution https://github.com/TooTallNate/node-bindings/issues/43
Just add faiss-node
as an external in the webpack config.
externals: {
// modules added here also need to be added in the .vscodeignore file
"faiss-node": "commonjs faiss-node",
},
then the sample code above and my own code using Faiss worked fine in a VSCode extension.
Describe the bug I am just trying to use the code provided in documentation inside the VSCODE extrension but I get the error below:
Code:
Error:
Environment:
To Reproduce Steps to reproduce the behavior:
Expected behavior Faiss node should be imported
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.