Skip to content
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

simsimd node module fails bindings #7986

Closed
sroussey opened this issue Jan 4, 2024 · 3 comments
Closed

simsimd node module fails bindings #7986

sroussey opened this issue Jan 4, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@sroussey
Copy link
Contributor

sroussey commented Jan 4, 2024

What version of Bun is running?

❯ bun -v
1.0.21

What platform is your computer?

❯ uname -mprs
Darwin 23.2.0 arm64 arm

What steps can reproduce the bug?

bun i simsimd

import { inner, cosine } from "simsimd";
console.log({ inner, cosine });

What is the expected behavior?

In this simple example, show that the functions exist

What do you see instead?

❯ bun run test.ts
83 |         throw e
84 |       }
85 |     }
86 |   }
87 | 
88 |   err = new Error('Could not locate the bindings file. Tried:\n'
             ^
error: Could not locate the bindings file. Tried:
 → /Users/steve/Code/elmers/node_modules/simsimd/build/simsimd.node
 → /Users/steve/Code/elmers/node_modules/simsimd/build/Debug/simsimd.node
 → /Users/steve/Code/elmers/node_modules/simsimd/build/Release/simsimd.node
 → /Users/steve/Code/elmers/node_modules/simsimd/out/Debug/simsimd.node
 → /Users/steve/Code/elmers/node_modules/simsimd/Debug/simsimd.node
 → /Users/steve/Code/elmers/node_modules/simsimd/out/Release/simsimd.node
 → /Users/steve/Code/elmers/node_modules/simsimd/Release/simsimd.node
 → /Users/steve/Code/elmers/node_modules/simsimd/build/default/simsimd.node
 → /Users/steve/Code/elmers/node_modules/simsimd/compiled/20.8.0/darwin/arm64/simsimd.node
      at bindings (/Users/steve/Code/elmers/node_modules/bindings/bindings.js:88:9)
      at /Users/steve/Code/elmers/node_modules/simsimd/javascript/simsimd.js:1:7

Additional information

No response

@sroussey sroussey added the bug Something isn't working label Jan 4, 2024
@Jarred-Sumner
Copy link
Collaborator

The fix is to add simsimd to "trustedDependencies" in package.json, so that the lifecycle scripts are executed. We need to add a warning that we skipped the lifecycle script for the package to make this easier to understand

https://bun.sh/guides/install/trusted

@Jarred-Sumner Jarred-Sumner closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2024
@sroussey
Copy link
Contributor Author

sroussey commented Jan 5, 2024

Is there something that can be done on their side?

and is napi the best way or could they use ffi?

I guess they way to do on their end is pre-build for all platforms?

@sroussey
Copy link
Contributor Author

sroussey commented Jan 5, 2024

Also, is there a way to bun i simsimd —trusted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants