-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
VOSK not compatible with newer NodeJS Versions because of ffi-napi dependency #1613
Comments
We need to write direct bindings for node. I think ff-napi is hopeless. |
Are there any solutions for this :( I really need to use VOSK with Node.js v21. |
Is there a roadmap for when this might happen? |
What seems to work is, install VOSK with an older node version and switch to a high node version afterwards. So: Not sure if that might have any other issues later on. but so far it works. it is pretty inconvenient for deployment but does the trick during development. |
Actually, I'm depending on pnpm - which is not compatible with version <18.12. |
I see - what might be an option is to use an old version of node with npm to just install vosk in an empty folder and copy the contents of the node_module into the pnpm contents folder somehow? Since the issue is the binding step with ffi-napi. so if vosk package is once installed and bindings / c++ are successfull, it works by copy pasting (in theory) |
Oh, that was not in my mind - let me have a minute and try it. |
Well, I think it's working! (for just a reference, I created a new folder and nvm to use the older node and npm. Then used them to install vosk, and using cp command copied everything into the working node_modules. The problem is that now it requires weird steps to use lmao) |
Any updates on this? Really don't want to use an unsupported version of node to make this work... |
I do have the issue that VOSK will only run in older NodeJS versions, since ffi-napi package seems to be incompatible with newer node versions 18.7^ .
This was tested on multiple windows 11 machines as well as within Debian Bookworm (Docker Dev Container)
Reproduce:
nvm install 18.7
nvm use 18.7
npm install vosk -> ERRORs
nvm install 18.4
nvm use 18.4
npm install vosk -> SUCCESS
nvm install 18.7
nvm use 18.7
npm install ffi-napi -> ERRORs
nvm install 18.4
nvm use 18.4
npm install ffi-napi -> SUCCESS
To isolate this: If I try to install ffi-napi without vosk in for example Node 18.7^ , I already get errors and ffi-napi can not be installed anymore. Since VOSK depends on ffi-napi, VOSK will fail to install on those versions.
Is there anyway to use a maintained dependency instead of ffi-napi? ffi-napi isn't maintained in years.
Would ffi-rs be an alternative to use here?
2024-07-26T09_04_45_570Z-debug-0.log
The text was updated successfully, but these errors were encountered: