Failed to install mediasoup@3 Windows 10

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. :expressionless:

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

1 Like
  • 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