Can't install opus on my M1 Mac
MrJirkaCZ opened this issue · 0 comments
Please describe the problem you are having in as much detail as possible:
Hey, I am having a really hard time trying to install opus with node on my M1 Mac. I've tried fixes mentioned in other issues but none of them worked for me sadly :(
Include a reproducible code sample here, if possible:
npm i @discordjs/opus
- @discordjs/opus version: newest
- Node.js version: 16.15.0
- Operating system: macOS Monterey
- Priority this issue should have – please be realistic and elaborate if possible: I am currently working on my school finals and I really wanted to use opus :/ I would love to have it fixed asap, but I understand your time capacities.
Log
npm ERR! code 1
npm ERR! path /Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream.o
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus_projection_encoder.o
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/analysis.o
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/mlp_data.o
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_encoder.o
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus_projection_decoder.o
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/mapping_matrix.o
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus_compare.o
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/mlp.o
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus.o
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_decoder.o
npm ERR! CC(target) Release/obj.target/libopus/deps/opus/src/opus_decoder.o
npm ERR! Failed to execute '/Users/jirimensik/.nvm/versions/node/v16.15.0/bin/node /Users/jirimensik/.nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node --module_name=opus --module_path=/Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown --napi_version=8 --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.2
npm ERR! node-pre-gyp info using node@16.15.0 | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.5.3/opus-v0.5.3-node-v93-napi-v3-darwin-arm64-unknown-unknown.tar.gz
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-v93-napi-v3-darwin-arm64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @discordjs/opus@0.5.3 and node@16.15.0 (node-v93 ABI, unknown) (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.5.3/opus-v0.5.3-node-v93-napi-v3-darwin-arm64-unknown-unknown.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.15.0 | darwin | arm64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.15.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.10.4 found at "/Library/Frameworks/Python.framework/Versions/3.10/bin/python3"
npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/3.10/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/jirimensik/.nvm/versions/node/v16.15.0/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 '/Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/opus/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/jirimensik/.nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/jirimensik/Library/Caches/node-gyp/16.15.0/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=/Users/jirimensik/Library/Caches/node-gyp/16.15.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/jirimensik/.nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/jirimensik/Library/Caches/node-gyp/16.15.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/jirimensik/Desktop/Discord bot/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.0.0
npm ERR! gyp info using node@16.15.0 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../deps/opus/src/opus_decoder.c:50:
npm ERR! In file included from ../deps/opus/silk/structs.h:32:
npm ERR! In file included from ../deps/opus/silk/SigProc_FIX.h:51:
npm ERR! ../deps/opus/silk/arm/biquad_alt_arm.h:31:11: fatal error: 'celt/arm/armcpu.h' file not found
npm ERR! # include "celt/arm/armcpu.h"
npm ERR! ^~~~~~~~~~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/libopus/deps/opus/src/opus_decoder.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 (/Users/jirimensik/.nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.4.0
npm ERR! gyp ERR! command "/Users/jirimensik/.nvm/versions/node/v16.15.0/bin/node" "/Users/jirimensik/.nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node" "--module_name=opus" "--module_path=/Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd /Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/opus
npm ERR! gyp ERR! node -v v16.15.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
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 '/Users/jirimensik/.nvm/versions/node/v16.15.0/bin/node /Users/jirimensik/.nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown/opus.node --module_name=opus --module_path=/Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-darwin-arm64-unknown-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:85:20)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.4.0
npm ERR! node-pre-gyp ERR! command "/Users/jirimensik/.nvm/versions/node/v16.15.0/bin/node" "/Users/jirimensik/Desktop/Discord bot/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/jirimensik/Desktop/Discord bot/node_modules/@discordjs/opus
npm ERR! node-pre-gyp ERR! node -v v16.15.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.4.2
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jirimensik/.npm/_logs/2022-05-23T21_29_09_460Z-debug-0.log