im trying to install mediasoup@3 via npm .
i have done all steps that you guys have mentioned in the mediasoup v3 documentation. and now its giving me a long error
pls consider i am new to mediasoup
im trying to install mediasoup@3 via npm .
i have done all steps that you guys have mentioned in the mediasoup v3 documentation. and now its giving me a long error
pls consider i am new to mediasoup
Something went wrong. meson setup ...
- that command should be much longer (more than just two lines). Try to install mediasoup package without launching postinstall scripts:
npm i mediasoup --ignore-scripts
Then go to node_modules/mediasoup and run manually:
node npm-scripts.js worker:build
This way you’ll be able to see what happens in the process and the logs afterwards.
well i tried it and mediasoup install from npm was successful. but while building i almost got the same errors. the errors are so lengthy . i am attaching those errors here. could you please connect with me through discord or something ?
npm-scripts.js [INFO] running task "worker:build"
npm-scripts.js [INFO] buildWorker()
npm-scripts.js [INFO] installMsysMake()
npm-scripts.js [INFO] executeCmd(): C:\Users\RAVIM\AppData\Local\Programs\Python\Python311\python.exe worker\scripts\getmake.py
npm-scripts.js [INFO] executeCmd(): make -C worker
make: Entering directory `/c/Users/RAVIM/Desktop/PersonalWorks/sfu_test/node_modules/mediasoup/worker'
# Updated pip and setuptools are needed for meson.
# `--system` is not present everywhere and is only needed as workaround for
# Debian-specific issue (copied from https://github.com/gluster/gstatus/pull/33),
# fallback to command without `--system` if the first one fails.
python -m pip install --system --target=/c/Users/RAVIM/Desktop/PersonalWorks/sfu_test/node_modules/mediasoup/worker/out/pip pip setuptools || \
python -m pip install --target=/c/Users/RAVIM/Desktop/PersonalWorks/sfu_test/node_modules/mediasoup/worker/out/pip pip setuptools || \
echo "Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package"
Usage:
c:\Users\RAVIM\AppData\Local\Programs\Python\Python311\python.exe -m pip install [options] <requirement specifier> [package-index-options] ...
c:\Users\RAVIM\AppData\Local\Programs\Python\Python311\python.exe -m pip install [options] -r <requirements file> [package-index-options] ...
c:\Users\RAVIM\AppData\Local\Programs\Python\Python311\python.exe -m pip install [options] [-e] <vcs project url> ...
c:\Users\RAVIM\AppData\Local\Programs\Python\Python311\python.exe -m pip install [options] [-e] <local project path> ...
c:\Users\RAVIM\AppData\Local\Programs\Python\Python311\python.exe -m pip install [options] <archive url/path> ...
no such option: --system
Collecting pip
Using cached pip-23.0.1-py3-none-any.whl (2.1 MB)
Collecting setuptools
Using cached setuptools-67.4.0-py3-none-any.whl (1.1 MB)
Installing collected packages: setuptools, pip
Successfully installed pip-23.0.1 setuptools-67.4.0
# Install `meson` and `ninja` using `pip` into custom location, so we don't
# depend on system-wide installation.
python -m pip install --upgrade --target=/c/Users/RAVIM/Desktop/PersonalWorks/sfu_test/node_modules/mediasoup/worker/out/pip meson==0.61.5 ninja==1.10.2.4
Collecting meson==0.61.5
Using cached meson-0.61.5-py3-none-any.whl (862 kB)
Collecting ninja==1.10.2.4
Using cached ninja-1.10.2.4-py2.py3-none-win_amd64.whl (293 kB)
Installing collected packages: ninja, meson
Successfully installed meson-0.61.5 ninja-1.10.2.4
/c/Users/RAVIM/Desktop/PersonalWorks/sfu_test/node_modules/mediasoup/worker/out/pip/bin/meson setup \
--prefix /c/Users/RAVIM/Desktop/PersonalWorks/sfu_test/node_modules/mediasoup/worker/out/Release \
--bindir '' \
--libdir '' \
--buildtype release \
-Db_ndebug=true \
-Db_pie=true \
-Db_staticpic=true \
--reconfigure \
--vsenv \
/c/Users/RAVIM/Desktop/PersonalWorks/sfu_test/node_modules/mediasoup/worker/out/Release/build || \
/c/Users/RAVIM/Desktop/PersonalWorks/sfu_test/node_modules/mediasoup/worker/out/pip/bin/meson setup \
--prefix /c/Users/RAVIM/Desktop/PersonalWorks/sfu_test/node_modules/mediasoup/worker/out/Release \
--bindir '' \
--libdir '' \
--buildtype release \
-Db_ndebug=true \
-Db_pie=true \
-Db_staticpic=true \
--vsenv \
/c/Users/RAVIM/Desktop/PersonalWorks/sfu_test/node_modules/mediasoup/worker/out/Release/build
Directory does not contain a valid build tree:
C:\Users\RAVIM\Desktop\PersonalWorks\sfu_test\node_modules\mediasoup\worker\out\Release\build
The Meson build system
Version: 0.61.5
Source dir: C:\Users\RAVIM\Desktop\PersonalWorks\sfu_test\node_modules\mediasoup\worker
Build dir: C:\Users\RAVIM\Desktop\PersonalWorks\sfu_test\node_modules\mediasoup\worker\out\Release\build
Build type: native build
Project name: mediasoup-worker
Project version: undefined
meson.build:1:0: ERROR: Could not parse vswhere.exe output
A full log can be found at C:\Users\RAVIM\Desktop\PersonalWorks\sfu_test\node_modules\mediasoup\worker\out\Release\build\meson-logs\meson-log.txt
make: *** [setup] Error 1
make: Leaving directory `/c/Users/RAVIM/Desktop/PersonalWorks/sfu_test/node_modules/mediasoup/worker'
npm-scripts.js [ERROR] executeCmd() failed, exiting: Error: Command failed: make -C worker
Do you have Visual Studio installed? Meson executes the following command:
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -requiresAny -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -requires Microsoft.VisualStudio.Workload.WDExpress -products * -utf8 -format json
and expects a json object in return. Try to run it (all this in a single line), what’s the result?
So the problem is with the Visual Studio. vswhere
should return something, not an empty array. The purpose of these manipulations is to set up an environment with VC’s variables pointing to the correct paths. As a last resort (providing that Visual Studio is actually installed), you may try to do it manually, by running vcvars64.bat and after that the mediasoup installation in the same console session. VS is usually places a link to it in the Start menu: Visual Studio * > x64 Native Tools Command Prompt for VS *