Issues installing @discordjs/opus

Attempting to install discordjs/opus, getting multiple errors. I've successfully installed the build tools, VS 2017 build tools, proper versions of python/C++/etc, getting a weird error and I'm not sure why.
5 Replies
d.js toolkit
d.js toolkit2mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Era
Era2mo ago
To save scrolling (it's pretty far down), the first error is:
381 error code 1
382 error path F:\_G\git\foxbot\node_modules\@discordjs\opus
383 error command failed
384 error command C:\windows\system32\cmd.exe /d /s /c C:\Users\maste\AppData\Local\Temp\install7556982526.cmd
385 error Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
385 error F:\_G\git\foxbot\node_modules\@discordjs\opus\build\deps\libopus.vcxproj(20,3): error MSB4019: The imported project "F:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
385 error Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\maste\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=F:\_G\git\foxbot\node_modules\@discordjs\opus\prebuild\node-v127-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=F:\_G\git\foxbot\node_modules\@discordjs\opus\prebuild\node-v127-napi-v3-win32-x64-unknown-unknown --napi_version=9 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
381 error code 1
382 error path F:\_G\git\foxbot\node_modules\@discordjs\opus
383 error command failed
384 error command C:\windows\system32\cmd.exe /d /s /c C:\Users\maste\AppData\Local\Temp\install7556982526.cmd
385 error Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
385 error F:\_G\git\foxbot\node_modules\@discordjs\opus\build\deps\libopus.vcxproj(20,3): error MSB4019: The imported project "F:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
385 error Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\maste\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=F:\_G\git\foxbot\node_modules\@discordjs\opus\prebuild\node-v127-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=F:\_G\git\foxbot\node_modules\@discordjs\opus\prebuild\node-v127-napi-v3-win32-x64-unknown-unknown --napi_version=9 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
I can't for the life of me figure out what's wrong.
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Era
Era2mo ago
I did, yeah, installed through visual studio installer. 2015 is installed for sodium, 2019/2022 workloads installed as well. Maybe I also need 2017? :Sweating:
No description
Era
Era2mo ago
Technically, with VS (I have 2022), but some stuff required older build tools. I do see that VCTargetsPath is missing entirely from the registry on all the versions, interesting... I see what you meant though, I didn't have them selected as part of VS 2022. I'll try that as well. Who needs disk space? Heh, I fixed it by setting msvs_version to 2019 ...which is interesting since sodium doesn't support anything above 2015.