Closed bengeek2 closed 6 months ago
There's no prebuilt package for your version of node (since it is fairly newer node) so it is attempting to build native package and failing because you don't have make
installed on your machine
https://stackoverflow.com/questions/14772508/npm-failed-to-install-time-with-make-not-found-error
Sorry for the confusion, I am very new to NPM. I installed base essentials, downgraded node, and tried to run the install again. This is the current error output. I did not downgrade gcc so this could also be an issue, but i am uncertain
npm WARN deprecated string-similarity@4.0.4: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm ERR! code 1
npm ERR! path /home/deck/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! make: Entering directory '/home/deck/node_modules/@discordjs/opus/build'
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream.o
npm ERR! make: Leaving directory '/home/deck/node_modules/@discordjs/opus/build'
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=/home/deck/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-x64-glibc-2.37/opus.node --module_name=opus --module_path=/home/deck/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-x64-glibc-2.37 --napi_version=9 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.4.5
npm ERR! node-pre-gyp info using node@18.17.1 | linux | x64
npm ERR! node-pre-gyp info check checked for "/home/deck/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-x64-glibc-2.37/opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.8.0/opus-v0.8.0-node-v108-napi-v3-linux-x64-glibc-2.37.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.8.0/opus-v0.8.0-node-v108-napi-v3-linux-x64-glibc-2.37.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @discordjs/opus@0.8.0 and node@18.17.1 (node-v108 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.8.0/opus-v0.8.0-node-v108-napi-v3-linux-x64-glibc-2.37.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@18.17.1 | linux | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@18.17.1 | linux | x64
npm ERR! gyp info find Python using Python version 3.11.3 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/deck/node_modules/@discordjs/opus/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/deck/.cache/node-gyp/18.17.1/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/deck/.cache/node-gyp/18.17.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/deck/.cache/node-gyp/18.17.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/deck/node_modules/@discordjs/opus',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@18.17.1 | linux | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../deps/opus/include/opus_types.h:46,
npm ERR! from ../deps/opus/include/opus.h:36,
npm ERR! from ../deps/opus/include/opus_multistream.h:36,
npm ERR! from ../deps/opus/src/opus_multistream.c:32:
npm ERR! /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
npm ERR! 9 | # include_next <stdint.h>
npm ERR! | ^~~~~~~~~~
npm ERR! compilation terminated.
npm ERR! make: *** [deps/libopus.target.mk:306: Release/obj.target/libopus/deps/opus/src/opus_multistream.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 6.1.52-valve9-1-neptune-61
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=/home/deck/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-x64-glibc-2.37/opus.node" "--module_name=opus" "--module_path=/home/deck/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-x64-glibc-2.37" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd /home/deck/node_modules/@discordjs/opus
npm ERR! gyp ERR! node -v v18.17.1
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
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=/home/deck/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-x64-glibc-2.37/opus.node --module_name=opus --module_path=/home/deck/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-x64-glibc-2.37 --napi_version=9 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/deck/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:85:20)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:514:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Linux 6.1.52-valve9-1-neptune-61
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/home/deck/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/deck/node_modules/@discordjs/opus
npm ERR! node-pre-gyp ERR! node -v v18.17.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.4.5
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in: /home/deck/.npm/_logs/2024-02-02T19_31_40_810Z-debug-0.log
Mhmm weird that
GET https://github.com/discordjs/opus/releases/download/v0.8.0/opus-v0.8.0-node-v108-napi-v3-linux-x64-glibc-2.37.tar.gz
Is returning 404 according to your logs but the url exists. Try deleting node_modules and npm install again
As for the build logs: yes it seems your gcc is the problem. You have incomplete c libraries: stdint.h: No such file or directory
The webpage resolves because github has a page there but no file. I can curl it, but no file is on the page. Thanks again for the help! Did some futzing with versions, and finally reduced my errors down to this:
> @discordjs/opus@0.8.0 install /home/deck/node_modules/@discordjs/opus
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.8.0/opus-v0.8.0-node-v83-napi-v3-linux-x64-glibc-2.37.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for @discordjs/opus@0.8.0 and node@14.17.3 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.8.0/opus-v0.8.0-node-v83-napi-v3-linux-x64-glibc-2.37.tar.gz
Traceback (most recent call last):
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module>
sys.exit(gyp.script_main())
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
return main(sys.argv[1:])
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
return gyp_main(args)
^^^^^^^^^^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 520, in gyp_main
[generator, flat_list, targets, data] = Load(
^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 136, in Load
result = gyp.input.Load(build_files, default_variables, includes[:],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2782, in Load
LoadTargetBuildFile(build_file, data, aux_data,
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 234, in LoadOneBuildFile
build_file_contents = open(build_file_path, 'rU').read()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU' while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:375:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 6.1.52-valve9-1-neptune-61
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/deck/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.37/opus.node" "--module_name=opus" "--module_path=/home/deck/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.37" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /home/deck/node_modules/@discordjs/opus
gyp ERR! node -v v14.17.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
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 configure --fallback-to-build --module=/home/deck/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.37/opus.node --module_name=opus --module_path=/home/deck/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.37 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/deck/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:85:20)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:375:28)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1055:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 6.1.52-valve9-1-neptune-61
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/deck/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/deck/node_modules/@discordjs/opus
node-pre-gyp ERR! node -v v14.17.3
node-pre-gyp ERR! node-pre-gyp -v v0.4.5
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/deck/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.37/opus.node --module_name=opus --module_path=/home/deck/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-x64-glibc-2.37 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN enoent ENOENT: no such file or directory, open '/home/deck/package.json'
npm WARN @dank074/discord-video-stream@3.0.5 requires a peer of discord.js-selfbot-v13@2.x but none is installed. You must install peer dependencies yourself.
npm WARN deck No description
npm WARN deck No repository field.
npm WARN deck No README data
npm WARN deck No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @discordjs/opus@0.8.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @discordjs/opus@0.8.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/deck/.npm/_logs/2024-02-02T20_44_27_066Z-debug.log
message.txt
Welp. It's cause I'm on a steam deck. Wanted to test this on the deck, and it turns out steamOS does not like running c program compilers. https://stackoverflow.com/questions/72398974/configure-error-cannot-run-c-compiled-programs-installing-gap-on-arch-linux
Ideal solution would be to make @discordjs/opus
a peer dependency, so it's not required for package installation, and on platforms where it doesn't work, opusscript
can be substituted in instead.
@bengeek2 Can you remove @discordjs/opus
from the package.json
and install opusscript
instead?
Upon attempting to install the package with npm by using "npm install @dank074/discord-video-stream@latest" the install errors out and fails. Errors start at ~line 480 in the log. It appears that this is an issue with installing opus, I do not know if this is relevent, but the package referenced on line 486 no longer exists.