-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
SqliteError: The specified module could not be found on Windows #526
Comments
If you want to avoid all the trouble you can define the |
I used .dll format, but the same error has been shown. |
thanks, I understand that. I'm not familiar to C so I'll try compiling the extension to .dll (not .so) later and see if works well. |
I have question, SQLite is working on node.js, then why I need to have a operation system compatible extension file for that? Since I googled a lot and couldn't find a precompiled extension and way to compile the .c program to .dll, I cannot think implementing this regex feature is this hard and barely no information around the internet. Also, I find a way to load extension within the SQL, like this below, isn't this works for .c program since not depends on the operation system? Thanks for your help. SELECT load_extension('/usr/lib/sqlite3/pcre.so'); |
Also, I use
in cmd and it works, but we have this error in this library and particularly NodeJs. I searched a lot of pages, but all solution talk about difference between 32bit and 64 bit of nodejs and this extension. Also, I downloaded both 32bit and 64bit version and tried the other solution, but they works for python not nodejs and this library. |
thanks for the info. |
Any updates on this issue? |
No updates. you can close the issue if you want to. |
I've encountered this problem and managed to resolve it. For my situation, the root cause is that better-sqlite3 only offers a binary for x64, but the default cl.exe is for x86. The DLL compiled with the x86 cl.exe will not work. What is even more confusing is that https://sqlite.org/download.html only offers a binary for x86. So, if we compile with the default cl.exe, it'll work with Sqlite CLI but not better-sqlite3. What we need to do is to switch the cl.exe from x86 to x64 by running I'm using better-sqlite3 with Electron successfully (see: https://superintendent.app), so if you have any question, Please let me know. I hope you are unblocked by my answer. For reference, my compilation command is: |
I'd like to use SQLite extension for Regexp.
Firstly I tried using the extension on WSL Linux bash on Windows, I'm on Windows. Run
sudo apt update ; sudo apt-get install sqlite3 sqlite3-pcre -y
and the same code as below worked well on it.But I'm working on Electron, this is working good on Windows, and from Powershell, so I wanted to use the extension from Windows side.
The locally installed packages are like this:
Then, I copied the extension file from WSL path
/usr/lib/sqlite3/pcre.so
to local Windows path./pcre.so
.Now the environment is the same as the Linux one, right? So I run the code.
index.js
But this time I got an error as below.
Full error
So, I could use the extension file on Linux, now on Windows, how can I load and use extensions? I need your help, I appreciate your help. Thanks.
The text was updated successfully, but these errors were encountered: