I want to install mediasoup using the npm install mediasoup@3 --save
command. but I got this error.
I have already followed the installation guide
Was getting the same error when I was trying installing using powershell. When did the same steps in Command promt, it succeed. Never forgot to run vcvars64
before installation.
still getting the same error ://
Just use uBuntu Desktop to develop and uBuntu server to host, not worth the trouble shooting to test and develop in windows and switch it over assuming you want a fast linux server hosting the files.
Windows lacks a bit of support, you are welcome to contribute to its support so far there are just tricks to get it working.
Thanks for the advice. Iâll try it with ubuntu.
On Windows I use Visual Studioâs x86_x64 Cross Tool Command Prompt to install Mediasoup
still getting the same error ://
Please can you provide the version of the following that you use:
- Visual Studio
- Node.js
- npm
Visual Studio: VS Community 2017, the latest update
NodeJS : 14.20 , before 16.17 (same problem)
NPM : 8.18.0
Hoping that your python version >= 3.6, I would suggest trying out Visual Studio 2019.
(Also posting additional logs will help)
hmm, okay, Iâll try VS 2019.
I use python 3.10
- Same mistake. Did you fix it?
I already have MSVS 2022 installed (this is not necessary, i guess anything equal to or above 2017 should work).
My python version is 3.10.7.
My node version is v14.19.1.
Locate vcvars64.bat (mine was âC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.batâ)
Start cmd in administrator mode and run above bat file
Then navigate to your folder directory where you would actually run npm install (something like D:\Projects\WebRTC\mediasoup\mediasoup-demo\server)
run npm install but from the already open cmd.
There are a lot of echos from the script which will be reported in the cmd if failed. Else it would succeed generating mediasoup-worker.exe
I have the same problem. I followed all of the installation guide. Is there any suggestion?
What is the error? Kindly share the screenshot plus versions of node, python, pip, make.
Installation looks good, can you share the entier erros from termial after you do npm installed? The above image you shared have some error which are out of view.
Sure, here is the whole result from the terminal.
and i think this is the relevant part of the 2023-01-19T18_41_11_495Z-debug-0.log file:
(before this part everything was completed, but i can copy here the whole log of course, if it could help)
166 timing build:link Completed in 17ms
167 info run mediasoup@3.11.5 postinstall node_modules/mediasoup node npm-scripts.js postinstall
168 info run mediasoup@3.11.5 postinstall { code: 1, signal: null }
169 timing reify:rollback:createSparse Completed in 325ms
170 timing reify:rollback:retireShallow Completed in 0ms
171 timing command:install Completed in 3044ms
172 verbose stack Error: command failed
172 verbose stack at ChildProcess. (C:\Users\Peti\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\promise-spawn\lib\index.js:53:27)
172 verbose stack at ChildProcess.emit (node:events:513:28)
172 verbose stack at maybeClose (node:internal/child_process:1091:16)
172 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
173 verbose pkgid mediasoup@3.11.5
174 verbose cwd C:\Users\Peti\Desktop\uj\mediasoup-sfu-webrtc-video-rooms
175 verbose Windows_NT 10.0.19045
176 verbose node v18.13.0
177 verbose npm v9.2.0
178 error code 1
179 error path C:\Users\Peti\Desktop\uj\mediasoup-sfu-webrtc-video-rooms\node_modules\mediasoup
180 error command failed
181 error command C:\Windows\system32\cmd.exe /d /s /c node npm-scripts.js postinstall
182 error npm-scripts.js [INFO] running task âpostinstallâ
182 error npm-scripts.js [INFO] buildWorker()
182 error npm-scripts.js [INFO] executeCmd(): make -C worker
182 error make: Entering directory âC:/Users/Peti/Desktop/uj/mediasoup-sfu-webrtc-video-rooms/node_modules/mediasoup/workerâ
182 error /c/Users/Peti/Desktop/uj/mediasoup-sfu-webrtc-video-rooms/node_modules/mediasoup/worker/out/pip/bin/meson setup
182 error --prefix /c/Users/Peti/Desktop/uj/mediasoup-sfu-webrtc-video-rooms/node_modules/mediasoup/worker/out/Release
182 error --bindir ââ
182 error --libdir ââ
182 error --buildtype release
182 error -Db_ndebug=true
182 error -Db_pie=true
182 error -Db_staticpic=true
182 error --reconfigure
182 error --vsenv
182 error /c/Users/Peti/Desktop/uj/mediasoup-sfu-webrtc-video-rooms/node_modules/mediasoup/worker/out/Release/build ||
182 error /c/Users/Peti/Desktop/uj/mediasoup-sfu-webrtc-video-rooms/node_modules/mediasoup/worker/out/pip/bin/meson setup
182 error --prefix /c/Users/Peti/Desktop/uj/mediasoup-sfu-webrtc-video-rooms/node_modules/mediasoup/worker/out/Release
182 error --bindir ââ
182 error --libdir ââ
182 error --buildtype release
182 error -Db_ndebug=true
182 error -Db_pie=true
182 error -Db_staticpic=true
182 error --vsenv
182 error /c/Users/Peti/Desktop/uj/mediasoup-sfu-webrtc-video-rooms/node_modules/mediasoup/worker/out/Release/build
182 error Makefile:110: recipe for target âsetupâ failed
182 error make: Leaving directory âC:/Users/Peti/Desktop/uj/mediasoup-sfu-webrtc-video-rooms/node_modules/mediasoup/workerâ
183 error /usr/bin/sh: line 1: /c/Users/Peti/Desktop/uj/mediasoup-sfu-webrtc-video-rooms/node_modules/mediasoup/worker/out/pip/bin/meson: No such file or directory
183 error /usr/bin/sh: line 12: /c/Users/Peti/Desktop/uj/mediasoup-sfu-webrtc-video-rooms/node_modules/mediasoup/worker/out/pip/bin/meson: No such file or directory
183 error make: *** [setup] Error 127
183 error npm-scripts.js [ERROR] executeCmd() failed, exiting: Error: Command failed: make -C worker
184 verbose exit 1
185 timing npm Completed in 3135ms
186 verbose unfinished npm timer reify 1674153671563
187 verbose unfinished npm timer reify:build 1674153673744
188 verbose unfinished npm timer build 1674153673744
189 verbose unfinished npm timer build:deps 1674153673744
190 verbose unfinished npm timer build:run:postinstall 1674153673766
191 verbose unfinished npm timer build:run:postinstall:node_modules/mediasoup 1674153673766
192 verbose code 1
193 error A complete log of this run can be found in:
193 error C:\Users\Peti\AppData\Local\npm-cache_logs\2023-01-19T18_41_11_495Z-debug-0.log
To make sure it is not path related issue kindly change the dir name, currently you have quite lengthy name, change it to mediasoupsfu/ and install in it. Also you are in C: drive, kindly try it in some other drive like D:, E: etc to make sure it is not permission related issue.
Also make sure to follow all the things mentioned here:
Thank you very much for your help, i feel impressed of the support.
I found the problem and of course i made a mistake.
A had had make installed on mine computer before i tried to install mediasoup and though i used MinGw to install make (i forget that i had make alredy installed) the make command used the earlier installed make (it was not msys make).
Now i have msys make and it is working well.
The make --version command shows the problem:
Here is which did not work:
And which is working well:
Thank very much for the help again!