discordjs / opus

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

Not installing in mac m1 (macOs 11.2) #130

Closed varun-s22 closed 2 years ago

varun-s22 commented 2 years ago

Whenever i try to install this package on my machine (macbook air m1 2020), it gives me bunch of errors, and is not installed.

Here's the error stack

npm ERR! code 126 npm ERR! path /Users/varun/Desktop/YAMB/node_modules/@discordjs/opus npm ERR! command failed npm ERR! command sh -c node-pre-gyp install --fallback-to-build npm ERR! sh: /Users/varun/Desktop/YAMB/node_modules/.bin/node-pre-gyp: Permission denied

npm ERR! A complete log of this run can be found in: npm ERR! /Users/varun/.npm/_logs/2022-06-12T19_30_04_949Z-debug-0.log

Also I tried to install this package in a docker container(node:alpine 13.6), and here's what i got

9 9.744 npm ERR! code 1

9 9.744 npm ERR! path /app/node_modules/@discordjs/opus

9 9.745 npm ERR! command failed

9 9.745 npm ERR! command sh -c node-pre-gyp install --fallback-to-build

9 9.745 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=/app/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-arm64-musl-1.2.3/opus.node --module_name=opus --module_path=/app/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-arm64-musl-1.2.3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)

9 9.746 npm ERR! node-pre-gyp info it worked if it ends with ok

9 9.746 npm ERR! node-pre-gyp info using node-pre-gyp@0.4.2

9 9.746 npm ERR! node-pre-gyp info using node@18.3.0 | linux | arm64

9 9.746 npm ERR! node-pre-gyp info check checked for "/app/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-arm64-musl-1.2.3/opus.node" (not found)

9 9.746 npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.5.3/opus-v0.5.3-node-v108-napi-v3-linux-arm64-musl-1.2.3.tar.gz

9 9.746 npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.5.3/opus-v0.5.3-node-v108-napi-v3-linux-arm64-musl-1.2.3.tar.gz

9 9.746 npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @discordjs/opus@0.5.3 and node@18.3.0 (node-v108 ABI, musl) (falling back to source compile with node-gyp)

9 9.746 npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.5.3/opus-v0.5.3-node-v108-napi-v3-linux-arm64-musl-1.2.3.tar.gz

9 9.746 npm ERR! gyp info it worked if it ends with ok

9 9.746 npm ERR! gyp info using node-gyp@9.0.0

9 9.746 npm ERR! gyp info using node@18.3.0 | linux | arm64

9 9.746 npm ERR! gyp info ok

9 9.746 npm ERR! gyp info it worked if it ends with ok

9 9.746 npm ERR! gyp info using node-gyp@9.0.0

9 9.746 npm ERR! gyp info using node@18.3.0 | linux | arm64

9 9.746 npm ERR! gyp info find Python using Python version 3.10.4 found at "/usr/bin/python3"

9 9.746 npm ERR! gyp http GET https://nodejs.org/download/release/v18.3.0/node-v18.3.0-headers.tar.gz

9 9.746 npm ERR! gyp http 200 https://nodejs.org/download/release/v18.3.0/node-v18.3.0-headers.tar.gz

9 9.746 npm ERR! gyp http GET https://nodejs.org/download/release/v18.3.0/SHASUMS256.txt

9 9.746 npm ERR! gyp http 200 https://nodejs.org/download/release/v18.3.0/SHASUMS256.txt

9 9.746 npm ERR! gyp info spawn /usr/bin/python3

9 9.746 npm ERR! gyp info spawn args [

9 9.746 npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',

9 9.746 npm ERR! gyp info spawn args 'binding.gyp',

9 9.746 npm ERR! gyp info spawn args '-f',

9 9.746 npm ERR! gyp info spawn args 'make',

9 9.746 npm ERR! gyp info spawn args '-I',

9 9.746 npm ERR! gyp info spawn args '/app/node_modules/@discordjs/opus/build/config.gypi',

9 9.746 npm ERR! gyp info spawn args '-I',

9 9.746 npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',

9 9.746 npm ERR! gyp info spawn args '-I',

9 9.746 npm ERR! gyp info spawn args '/root/.cache/node-gyp/18.3.0/include/node/common.gypi',

9 9.746 npm ERR! gyp info spawn args '-Dlibrary=shared_library',

9 9.746 npm ERR! gyp info spawn args '-Dvisibility=default',

9 9.746 npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/18.3.0',

9 9.746 npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',

9 9.746 npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/18.3.0/<(target_arch)/node.lib',

9 9.746 npm ERR! gyp info spawn args '-Dmodule_root_dir=/app/node_modules/@discordjs/opus',

9 9.746 npm ERR! gyp info spawn args '-Dnode_engine=v8',

9 9.746 npm ERR! gyp info spawn args '--depth=.',

9 9.746 npm ERR! gyp info spawn args '--no-parallel',

9 9.746 npm ERR! gyp info spawn args '--generator-output',

9 9.747 npm ERR! gyp info spawn args 'build',

9 9.747 npm ERR! gyp info spawn args '-Goutput_dir=.'

9 9.747 npm ERR! gyp info spawn args ]

9 9.747 npm ERR! gyp info ok

9 9.747 npm ERR! gyp info it worked if it ends with ok

9 9.747 npm ERR! gyp info using node-gyp@9.0.0

9 9.747 npm ERR! gyp info using node@18.3.0 | linux | arm64

9 9.747 npm ERR! gyp ERR! build error

9 9.747 npm ERR! gyp ERR! stack Error: not found: make

9 9.747 npm ERR! gyp ERR! stack at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:10:17)

9 9.747 npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:57:18

9 9.747 npm ERR! gyp ERR! stack at new Promise ()

9 9.747 npm ERR! gyp ERR! stack at step (/usr/local/lib/node_modules/npm/node_modules/which/which.js:54:21)

9 9.747 npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:71:22

9 9.747 npm ERR! gyp ERR! stack at new Promise ()

9 9.747 npm ERR! gyp ERR! stack at subStep (/usr/local/lib/node_modules/npm/node_modules/which/which.js:69:33)

9 9.747 npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:80:22

9 9.747 npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5

9 9.747 npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5

9 9.747 npm ERR! gyp ERR! System Linux 5.10.104-linuxkit

9 9.747 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=/app/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-arm64-musl-1.2.3/opus.node" "--module_name=opus" "--module_path=/app/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-arm64-musl-1.2.3" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"

9 9.747 npm ERR! gyp ERR! cwd /app/node_modules/@discordjs/opus

9 9.747 npm ERR! gyp ERR! node -v v18.3.0

9 9.747 npm ERR! gyp ERR! node-gyp -v v9.0.0

9 9.747 npm ERR! gyp ERR! not ok

9 9.747 npm ERR! node-pre-gyp ERR! build error

9 9.747 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=/app/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-arm64-musl-1.2.3/opus.node --module_name=opus --module_path=/app/node_modules/@discordjs/opus/prebuild/node-v108-napi-v3-linux-arm64-musl-1.2.3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)

9 9.747 npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/app/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:85:20)

9 9.747 npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28)

9 9.747 npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)

9 9.747 npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)

9 9.747 npm ERR! node-pre-gyp ERR! System Linux 5.10.104-linuxkit

9 9.747 npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"

9 9.747 npm ERR! node-pre-gyp ERR! cwd /app/node_modules/@discordjs/opus

9 9.747 npm ERR! node-pre-gyp ERR! node -v v18.3.0

9 9.747 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.4.2

9 9.747 npm ERR! node-pre-gyp ERR! not ok

9 9.748

9 9.748 npm ERR! A complete log of this run can be found in:

9 9.748 npm ERR! /root/.npm/_logs/2022-06-12T19_24_16_526Z-debug-0.log


executor failed running [/bin/sh -c npm install discord.js @discordjs/voice discord-player dotenv ffmpeg-static libsodium-wrappers opusscript sodium-native tweetnacl ytdl-core @discordjs/opus]: exit code: