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

When using better_sqlite3 on macos: Error: Could not locate the bindings file. #6008

Closed
juliuslipp opened this issue Sep 24, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@juliuslipp
Copy link

What version of Bun is running?

1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49

What platform is your computer?

Darwin 22.6.0 arm64 arm

What steps can reproduce the bug?

- bun init

  • cd dir
    - bun add better-sqlite3

echo 'import Database from "better-sqlite3";
const db = new Database("db.sql");' >> index.ts

- `bun index.ts`
=> See the error

-`rm -rf node_modules`
- `pnpm i`
- `bun index.ts`
=> No error

### What is the expected behavior?

That it works.

### What do you see instead?

err = new Error(
            ^
error: Could not locate the bindings file. Tried:
 → /private/tmp/test/node_modules/better-sqlite3/build/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/build/Release/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/Debug/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/out/Release/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/Release/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/build/default/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/compiled/18.15.0/darwin/arm64/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/addon-build/debug/install-root/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/addon-build/default/install-root/better_sqlite3.node
 → /private/tmp/test/node_modules/better-sqlite3/lib/binding/node-v108-darwin-arm64/better_sqlite3.node
      at bindings (/private/tmp/test/node_modules/bindings/bindings.js:126:8)
      at new Database (/private/tmp/test/node_modules/better-sqlite3/lib/database.js:48:28)

### Additional information

_No response_
@juliuslipp juliuslipp added the bug Something isn't working label Sep 24, 2023
@Electroid
Copy link
Contributor

Duplicate of #4959

@Electroid Electroid marked this as a duplicate of #4959 Sep 24, 2023
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2023
@Jarred-Sumner
Copy link
Collaborator

Fixed by @dylan-conway and @paperdave in #7132

This will be part of the Bun v1.0.17 release, which ships in a few hours from the time of writing.

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

3 participants