-
Notifications
You must be signed in to change notification settings - Fork 57
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
@discordjs/opus does not support nodejs versions > v18.18.2 #147
Comments
This package definitely does support that version and has for a long time now. I installed it successfully on Node.js 18.17.1 right now, just to be sure. I'm not sure why this is failing for you though. Maybe look at where it says this:
Also, do you have build tools installed? |
Wait, is the title of your issue wrong? |
Yes I have python 3.12 installed and visual studio installed as indicated in the error. |
Hmm, I managed a successful install on 20.9.0. Maybe this is a Windows issue, as I'm reproducing this on Mac... |
Do we have any idea on when this can be fixed? I am having issues installing this on my Ubuntu 22.04 LTS? any help would be fab? We have managed to install v17.9.1 but would be good to see this on the current versions. :) |
Same problem on arch and windows. |
Same issue. It won't install on Node v20.9.0 - Python 3.12.0 - windows-build-tools 5.2.2 |
There is indeed an issue with Python 3.12. Python 3.12 removes "distutils" which breaks node-gyp before v10. node-gyp is located in npm's node_modules and you can't upgrade it without upgrading the whole npm. Fortunately, node-gyp is updated on latest release of npm, which also preinstalled on Node.js v20.10.0. So to fix problems related to "distutils" and Python 3.12, you'll only need to upgrade your Node.js version. But, if you're using other package manager like pnpm, you'll need to wait for pnpm to upgrade their version of node-gyp. Or you can replace the used node-gyp with your own installation of node-gyp.
This will make the package manager calls your node-gyp installation instead of the bundled one from your package manager so you don't need to wait for pnpm to update "But @discordjs/opus" use prebuilts, why it needs node-gyp?" |
I solved this just by switching to the latest v19 of Nodejs using nvm windows. Fortunately I did not have any v20 specific npm packages so it didn't break anything :) |
The module is throwing a 404 error because the files associated with Node.js v20 (
npm ERR! node-pre-gyp info using node-pre-gyp@0.4.5
npm ERR! node-pre-gyp info using node@20.11.0 | linux | x64
npm ERR! node-pre-gyp info check checked for "/home/discord/node_modules/@discordjs/opus/prebuild/node-v115-napi-v3-linux-x64-glibc-2.31/opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.9.0/opus-v0.9.0-node-v115-napi-v3-linux-x64-glibc-2.31.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.9.0/opus-v0.9.0-node-v115-napi-v3-linux-x64-glibc-2.31.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @discordjs/opus@0.9.0 and node@20.11.0 (node-v115 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.9.0/opus-v0.9.0-node-v115-napi-v3-linux-x64-glibc-2.31.tar.gz |
any one got the solution? |
Until this is fixed, you can use the opusscript module instead. |
This issue is happening to me after I upgraded my Fedora wsl from 38 to 40, before it was working well. And the error appears no matter if I'm using node 20.13.1 or 19.9.0 With opusscript it's working without issue |
I tried to install @discordjs/opus using nodejs versions above v18.18.2 but the same error keeps coming back.
I have observed several identical cases using nodejs v20 and encountering this error. I have deduced that the package does not support versions higher than nodejs v18.18.2.
I have python 3.12 installed and visual studio installed.
Erreur :
The text was updated successfully, but these errors were encountered: