forked from skozin/node-fdb
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
I'm trying to use this library with Bun and even though I set DYLD_LIBRARY_PATH, it's not working:
1 LoganDark ~ DYLD_LIBRARY_PATH="/usr/local/lib" bun repl
Welcome to Bun v1.3.0
Type ".help" for more information.
[!] Please note that the REPL implementation is still experimental!
Don't consider it to be representative of the stability or behavior of Bun overall.
> const fdb = require('foundationdb')
Could not load native module. Make sure the foundationdb client is installed and
(on windows) in your PATH. https://www.foundationdb.org/download/
MacOS note: You also need to set DYLD_LIBRARY_PATH="/usr/local/lib" due to notarization. Run:
echo 'export DYLD_LIBRARY_PATH="/usr/local/lib"' >> ~/.zshrc
source ~/.zshrc
Then retry. See https://github.com/josephg/node-foundationdb/issues/42 for details.
17 | var uv = (process.versions.uv || '').split('.')[0]
18 |
19 | module.exports = load
20 |
21 | function load (dir) {
22 | return runtimeRequire(load.resolve(dir))
^
error: dlopen(/Users/LoganDark/Documents/Projects/testabczed/node_modules/.bun/foundationdb@2.0.1/node_modules/foundationdb/prebuilds/darwin-arm64/node.napi.node, 0x0001): Library not loaded: @rpath/libfdb_c.dylib
Referenced from: <52BD6D66-7F39-36FB-8D3A-059CCA90D961> /Users/LoganDark/Documents/Projects/testabczed/node_modules/.bun/foundationdb@2.0.1/node_modules/foundationdb/prebuilds/darwin-arm64/node.napi.node
Reason: tried: '/usr/lib/libfdb_c.dylib' (no such file, not in dyld cache)
code: "ERR_DLOPEN_FAILED"
I looked at process.env and DYLD_LIBRARY_PATH is unset:
Is there any way to have the library look in /usr/local/bin as well or am I screwed?
I tried creating a symbolic link at /usr/bin/libfdb_c.dylib that points to /usr/local/bin/libfdb_c.dylib but I can't modify /usr/bin without disabling SIP (which would remove Apple Pay, iPhone Mirroring and other things)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels