Brooooooklyn / snappy

Fastest Snappy compression library in Node.js
MIT License
166 stars 10 forks source link

Not working with Bun #147

Closed carlosflorencio closed 1 year ago

carlosflorencio commented 1 year ago

Hi, I was trying to use Bun with an existing project but seems that Bun can't import this module. (Bun 1.0.2)

From their docs, they say 95% of the Node-API surface is covered, so it could be something around loading this lib.

The error I get:

bun install
bun run src/entry-points/server.ts
[0.02ms] ".env"
121 |         throw e;
122 |       }
123 |     }
124 |   }
125 |
126 |   err = new Error(
            ^
error: Could not locate the bindings file. Tried:
 → /project/node_modules/snappy/build/binding.node
 → /project/node_modules/snappy/build/Debug/binding.node
 → /project/node_modules/snappy/build/Release/binding.node
 → /project/node_modules/snappy/out/Debug/binding.node
 → /project/node_modules/snappy/Debug/binding.node
 → /project/node_modules/snappy/out/Release/binding.node
 → /project/node_modules/snappy/Release/binding.node
 → /project/node_modules/snappy/build/default/binding.node
 → /project/node_modules/snappy/compiled/18.15.0/darwin/arm64/binding.node
 → /project/node_modules/snappy/addon-build/release/install-root/binding.node
 → /project/node_modules/snappy/addon-build/debug/install-root/binding.node
 → /project/node_modules/snappy/addon-build/default/install-root/binding.node
 → /project/node_modules/snappy/lib/binding/node-v108-darwin-arm64/binding.node
Brooooooklyn commented 1 year ago

@carlosflorencio please upgrade to latest snappy version

carlosflorencio commented 1 year ago

You're right, updated and the issue is gone :). Thanks!