Can`t upgrade mediasoup to 3.9.X on Macbook M1

i try with node 16 and 17 both with Arm64 version

node 16 works great for me on M1 mac… try deleting node_module before doing a build

Also make sure that you have Python3 with pip installed

I check with node v16.14.2 arm64 , Python 3.9.12, pip3 v22.0.4 and Apple clang version 13.1.6 but
still getting these error

Even i am try to install in ubuntu based docker image and still getting these error

can you share you configuration with specific version

try to clear node npm cache, remove node_modules and rebuild

I installed node with nvm…
using node v16.14.2 (npm v8.5.5)

python --version
Python 3.9.10

pip3 --version
pip 21.3.1 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)

not working
can you share where is node and npm install by running whereis node or whereis npm command ?

what is your xcode version

Are you sure you’ve found the node_module folders and cleared any previous mediasoup entries? This has caused issues for me when re-installing (upgrading).

XCode Version 13.3.1 (13E500a)

Please confirm that you deleted node_modules… I have mentioned it multiple times and not heard a confirmation yet. That will totally explain your issues.

1 Like

Thanks for your time issue is my side I am using X64 version of VS code so their terminal not run on arm64

But currently i am facing error while installing meadiasoup in docker image following are the docker file setup

FROM python:3.10.2-buster
RUN groupadd --gid 1000 pn && useradd --uid 1000 --gid pn --shell /bin/bash --create-home pn
ENV POETRY_HOME=/usr/local
RUN
echo “deb Index of /node_16.x/ buster main” > /etc/apt/sources.list.d/nodesource.list &&
wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - &&
echo “deb https://dl.yarnpkg.com/debian/ stable main” > /etc/apt/sources.list.d/yarn.list &&
wget -qO- https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&
apt-get update &&
apt-get install -yqq nodejs=$(apt-cache show nodejs|grep Version|grep nodesource|cut -c 10-) yarn &&
apt-mark hold nodejs &&
pip install -U pip && pip install pipenv &&
npm i -g npm@^8 &&
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - &&
rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
RUN mkdir -p /usr/src/app/logs
COPY . .
CMD [ “npm”, “run”,“dev”]

and error is

Version: 0.62.0
#10 20.02 npm ERR! Source dir: /usr/src/app/node_modules/mediasoup/worker
#10 20.02 npm ERR! Build dir: /usr/src/app/node_modules/mediasoup/worker/out/Release/build
#10 20.02 npm ERR! Build type: native build
#10 20.02 npm ERR! Project name: mediasoup-worker
#10 20.02 npm ERR! Project version: undefined
#10 20.02 npm ERR! C compiler for the host machine: cc (gcc 8.3.0 “cc (Debian 8.3.0-6) 8.3.0”)
#10 20.02 npm ERR! C linker for the host machine: cc ld.bfd 2.31.1
#10 20.02 npm ERR! C++ compiler for the host machine: c++ (gcc 8.3.0 “c++ (Debian 8.3.0-6) 8.3.0”)
#10 20.02 npm ERR! C++ linker for the host machine: c++ ld.bfd 2.31.1
#10 20.02 npm ERR! Host machine cpu family: aarch64
#10 20.02 npm ERR! Host machine cpu: aarch64
#10 20.02 npm ERR! Downloading openssl source from https://www.openssl.org/source/openssl-1.1.1l.tar.gz
#10 20.02 npm ERR! Download size: 9834044
#10 20.02 npm ERR! Downloading: …make: Leaving directory ‘/usr/src/app/node_modules/mediasoup/worker’
#10 20.02 npm ERR! Usage:
#10 20.02 npm ERR! /usr/local/bin/python3 -m pip install [options] [package-index-options] …
#10 20.02 npm ERR! /usr/local/bin/python3 -m pip install [options] -r [package-index-options] …
#10 20.02 npm ERR! /usr/local/bin/python3 -m pip install [options] [-e] …
#10 20.02 npm ERR! /usr/local/bin/python3 -m pip install [options] [-e] …
#10 20.02 npm ERR! /usr/local/bin/python3 -m pip install [options] <archive url/path> …
#10 20.02 npm ERR!
#10 20.02 npm ERR! no such option: --system
#10 20.02 npm ERR! WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.10.4 documentation
#10 20.02 npm ERR! WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.10.4 documentation
#10 20.02 npm ERR! Directory does not contain a valid build tree:
#10 20.02 npm ERR! /usr/src/app/node_modules/mediasoup/worker/out/Release/build
#10 20.02 npm ERR! Segmentation fault
#10 20.02 npm ERR! make: *** [Makefile:74: setup] Error 139
#10 20.02
#10 20.02 npm ERR! A complete log of this run can be found in:
#10 20.02 npm ERR! /root/.npm/_logs/2022-04-19T12_02_42_989Z-debug-0.log

executor failed running [/bin/sh -c npm install]: exit code: 1