-
Notifications
You must be signed in to change notification settings - Fork 44
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
segfault when path set to null or undefined (typescript demands path to exist) #243
Comments
I can update the typings, but I can't reproduce any segfault when omitting the path (in fact the unit tests extensively use databases opened without a path so that can run on temp databases). Do you have any steps to reproduce this? |
Hey, thanks for the reply. For me it happens on node 20.3.0 on windows when you explicitly set Using lmdb v2.8.2 |
Hey, just to add to this: I've been using 2.9.1 and the typescript declarations seems to be different between ES and CJS files. |
Hello,
According to documentation, omitting the
path
parameter duringdb.open()
should create a temporary database that automatically deletes itself. However Typescript erroneously claims thatpath
is a required parameter and cannot be omitted.Furthermore, any attempt to make
path
behave as if omitted by setting it to null or undefined causes a segfault.Not a high priority issue, but we could improve QOL here by both updating the typings to mark
path
as optional as well as preventing null/undefined path from segfaulting and make it behave as if it were omitted.Thanks!
The text was updated successfully, but these errors were encountered: