Replies: 6 comments 3 replies
-
Currently you will need to use [email protected] for use with Deno. This is because in 2.3+ lmdb-js switched to using NAPI interface for better support with future Deno versions, but it has taken quite a while for Deno to actually implement NAPI. I believe it was just released recently, so hoping to re-test with latest Deno and see if I can get Deno working again using NAPI with an upcoming release. |
Beta Was this translation helpful? Give feedback.
-
V2.7.2 should now have basic support for running on latest version of Deno now (there are still a number of NAPI bugs in Deno, but most basic operations should work). Let me know if that works for you. |
Beta Was this translation helpful? Give feedback.
-
Struggling to understand how to import lmd and start calling methods correctly under Deno as well here. With: import * as lmdb from 'https://deno.land/x/[email protected]/index.js' The following it output: error: Relative import path "node-gyp-build-optional-packages" not prefixed with / or ./ or ../ Is there an example code snippet handy that could point me in the right direction? Appreciate any pointers. Cheers |
Beta Was this translation helpful? Give feedback.
-
So it looks like there was probably some regression in Deno with regards to NAPI in their latest release, as it was causing a segfault for me. I have changed some functions to use more direct NAPI which seems to address that issue. Also, with the latest Deno and lmdb-js, lmdb-js should now be loaded using Deno's new npm: module identifier: import { open } from 'npm:lmdb'; I have updated the docs to describe this. I will do some more testing and hopefully get this published soon. |
Beta Was this translation helpful? Give feedback.
-
Hey thanks for the response Kris. Congrats on the excellent project you're running. Yes, you are right. Here's what I'm getting (macos): $ deno --version
deno 1.30.0 (release, aarch64-apple-darwin)
v8 10.9.194.5
typescript 4.9.4
$ deno run --allow-env --allow-read --allow-ffi --unstable main.ts
napi_add_finalizer is not yet supported.
...
zsh: segmentation fault deno run --allow-env --allow-read --allow-ffi --unstable main.ts I'll keep an eye out for the next release. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Ok, I fixed some issues with some deps, and I think 2.7.7 should be working better on Deno now. Note, that asynchronous transactions are not supported yet, and I don't really know how to get rid of their |
Beta Was this translation helpful? Give feedback.
-
Hi,
We're trying to use the library for a new product my company is working on, using Deno v1.26.1.
We're importing using
import * as lmdb from 'https://deno.land/x/[email protected]/index.js';
When trying to run, this fails with the following error:
error: Relative import path "events" not prefixed with / or ./ or ../
at https://deno.land/x/[email protected]/index.js:1:30
Any help would be very appreciated.
Thanks,
Ofri
Beta Was this translation helpful? Give feedback.
All reactions