discordjs / opus

Native opus bindings for node
MIT License
188 stars 53 forks source link

NPM Install Failure 404 #153

Closed BennyDaBee closed 2 months ago

BennyDaBee commented 2 months ago

Issue description

Getting the following error when trying to NPM install

Code sample

0.826 npm WARN EBADENGINE Unsupported engine {
0.826 npm WARN EBADENGINE   package: 'emit@0.0.2',
0.827 npm WARN EBADENGINE   required: { node: '~0.6.6' },
0.827 npm WARN EBADENGINE   current: { node: 'v22.0.0', npm: '10.5.1' }
0.827 npm WARN EBADENGINE }
9.211 npm notice
9.211 npm notice New minor version of npm available! 10.5.1 -> 10.6.0
9.211 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.6.0>
9.211 npm notice Run `npm install -g npm@10.6.0` to update!
9.211 npm notice
9.212 npm ERR! code 1
9.212 npm ERR! path /Bot/node_modules/@discordjs/opus
9.213 npm ERR! command failed
9.213 npm ERR! command sh -c node-pre-gyp install --fallback-to-build
9.213 npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Bot/node_modules/@discordjs/opus/prebuild/node-v127-napi-v3-linux-x64-musl-1.2.4_git20230717/opus.node --module_name=opus --module_path=/Bot/node_modules/@discordjs/opus/prebuild/node-v127-napi-v3-linux-x64-musl-1.2.4_git20230717 --napi_version=9 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
9.213 npm ERR! node-pre-gyp info it worked if it ends with ok
9.213 npm ERR! node-pre-gyp info using node-pre-gyp@0.4.5
9.213 npm ERR! node-pre-gyp info using node@22.0.0 | linux | x64
9.213 npm ERR! (node:17) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
9.213 npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
9.213 npm ERR! node-pre-gyp info check checked for "/Bot/node_modules/@discordjs/opus/prebuild/node-v127-napi-v3-linux-x64-musl-1.2.4_git20230717/opus.node" (not found)
9.213 npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.9.0/opus-v0.9.0-node-v127-napi-v3-linux-x64-musl-1.2.4_git20230717.tar.gz
9.214 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-v127-napi-v3-linux-x64-musl-1.2.4_git20230717.tar.gz
9.214 npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @discordjs/opus@0.9.0 and node@22.0.0 (node-v127 ABI, musl) (falling back to source compile with node-gyp)
9.214 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-v127-napi-v3-linux-x64-musl-1.2.4_git20230717.tar.gz
9.214 npm ERR! gyp info it worked if it ends with ok
9.214 npm ERR! gyp info using node-gyp@10.1.0
9.214 npm ERR! gyp info using node@22.0.0 | linux | x64
9.214 npm ERR! gyp info ok
9.214 npm ERR! gyp info it worked if it ends with ok
9.214 npm ERR! gyp info using node-gyp@10.1.0
9.215 npm ERR! gyp info using node@22.0.0 | linux | x64
9.215 npm ERR! gyp info find Python using Python version 3.11.9 found at "/usr/bin/python3"
9.215 npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v22.0.0/node-v22.0.0-headers.tar.gz
9.215 npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v22.0.0/node-v22.0.0-headers.tar.gz
9.215 npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v22.0.0/SHASUMS256.txt
9.215 npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v22.0.0/SHASUMS256.txt
9.215 npm ERR! gyp info spawn /usr/bin/python3
9.215 npm ERR! gyp info spawn args [
9.215 npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
9.216 npm ERR! gyp info spawn args 'binding.gyp',
9.216 npm ERR! gyp info spawn args '-f',
9.216 npm ERR! gyp info spawn args 'make',
9.216 npm ERR! gyp info spawn args '-I',
9.216 npm ERR! gyp info spawn args '/Bot/node_modules/@discordjs/opus/build/config.gypi',
9.216 npm ERR! gyp info spawn args '-I',
9.216 npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
9.216 npm ERR! gyp info spawn args '-I',
9.216 npm ERR! gyp info spawn args '/root/.cache/node-gyp/22.0.0/include/node/common.gypi',
9.217 npm ERR! gyp info spawn args '-Dlibrary=shared_library',
9.217 npm ERR! gyp info spawn args '-Dvisibility=default',
9.217 npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/22.0.0',
9.217 npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
9.217 npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/22.0.0/<(target_arch)/node.lib',
9.217 npm ERR! gyp info spawn args '-Dmodule_root_dir=/Bot/node_modules/@discordjs/opus',
9.217 npm ERR! gyp info spawn args '-Dnode_engine=v8',
9.217 npm ERR! gyp info spawn args '--depth=.',
9.217 npm ERR! gyp info spawn args '--no-parallel',
9.217 npm ERR! gyp info spawn args '--generator-output',
9.217 npm ERR! gyp info spawn args 'build',
9.217 npm ERR! gyp info spawn args '-Goutput_dir=.'
9.217 npm ERR! gyp info spawn args ]
9.218 npm ERR! gyp info ok
9.218 npm ERR! gyp info it worked if it ends with ok
9.218 npm ERR! gyp info using node-gyp@10.1.0
9.218 npm ERR! gyp info using node@22.0.0 | linux | x64
9.218 npm ERR! gyp ERR! build error
9.218 npm ERR! gyp ERR! stack Error: not found: make
9.219 npm ERR! gyp ERR! stack at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/lib/index.js:16:17)
9.219 npm ERR! gyp ERR! stack at which (/usr/local/lib/node_modules/npm/node_modules/which/lib/index.js:77:9)
9.219 npm ERR! gyp ERR! stack at async doWhich (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:112:22)
9.219 npm ERR! gyp ERR! stack at async loadConfigGypi (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:77:7)
9.219 npm ERR! gyp ERR! stack at async build (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:35:3)
9.219 npm ERR! gyp ERR! stack at async run (/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:81:18)
9.219 npm ERR! gyp ERR! System Linux 5.15.133.1-microsoft-standard-WSL2
9.219 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Bot/node_modules/@discordjs/opus/prebuild/node-v127-napi-v3-linux-x64-musl-1.2.4_git20230717/opus.node" "--module_name=opus" "--module_path=/Bot/node_modules/@discordjs/opus/prebuild/node-v127-napi-v3-linux-x64-musl-1.2.4_git20230717" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
9.219 npm ERR! gyp ERR! cwd /Bot/node_modules/@discordjs/opus
9.220 npm ERR! gyp ERR! node -v v22.0.0
9.220 npm ERR! gyp ERR! node-gyp -v v10.1.0
9.220 npm ERR! gyp ERR! not ok
9.220 npm ERR! node-pre-gyp ERR! build error
9.220 npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Bot/node_modules/@discordjs/opus/prebuild/node-v127-napi-v3-linux-x64-musl-1.2.4_git20230717/opus.node --module_name=opus --module_path=/Bot/node_modules/@discordjs/opus/prebuild/node-v127-napi-v3-linux-x64-musl-1.2.4_git20230717 --napi_version=9 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
9.220 npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Bot/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:85:20)
9.220 npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:520:28)
9.220 npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1105:16)
9.220 npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
9.220 npm ERR! node-pre-gyp ERR! System Linux 5.15.133.1-microsoft-standard-WSL2
9.220 npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/Bot/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
9.220 npm ERR! node-pre-gyp ERR! cwd /Bot/node_modules/@discordjs/opus
9.220 npm ERR! node-pre-gyp ERR! node -v v22.0.0
9.220 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.4.5
9.220 npm ERR! node-pre-gyp ERR! not ok

Versions

node:alpine opus 0.9.0 Node v22 and V18.20.2

Issue priority

Medium (should be fixed soon)

Qjuh commented 2 months ago

You are missing build_essentials, explicitly make in this case. Make sure you got everything needed installed to compile opus on your host.

BennyDaBee commented 2 months ago

Sweet that was it. Thank you. Guess I shoulda caught that in the errors.