Install fails in Windows

Microsoft Windows [版本 10.0.18362.476]
node v10.16.3
Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 21:01:17) [MSC v.1500 64 bit (AMD64)] on win32
Visual Studio 2017

Use the above software version, and configure the environment variables according to the official website. But I made an error installing the server directory.

Details are as follows:

D:\workspace\工作\mediasoup-demo\server\node_modules\clang-tools-prebuilt\install.js:24
if (!platforms[platform]) throw new Error('Unknown platform: ' + platform)
                          ^

Error: Unknown platform: win32
    at Object.<anonymous> (D:\workspace\工作\mediasoup-demo\server\node_modules\clang-tools-prebuilt\install.js:24:33)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

> mediasoup@3.4.2 postinstall D:\workspace\工作\mediasoup-demo\server\node_modules\mediasoup
> node npm-scripts.js postinstall

npm-scripts.js [INFO] running task "postinstall"
npm-scripts.js [INFO] executing command: python ./worker/scripts/configure.py --format=msvs -R mediasoup-worker
['--format=msvs', '-R', 'mediasoup-worker', 'worker\\mediasoup-worker.gyp', '-I', 'worker\\common.gypi', '--depth=worker', '-Dhost_arch=AMD64', '-Dtarget_arch=AMD64', '-Dopenssl_fips=', '-Dmediasoup_asan=false', '-Dnode_byteorder=little']
gyp: Visual Studio 2017 requires any SDK of ['v10.0', 'v8.1'] version, but none were found
Error running GYP
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: clang-tools-prebuilt@0.1.4 (node_modules\clang-tools-prebuilt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: clang-tools-prebuilt@0.1.4 postinstall: `node install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mediasoup@3.4.2 postinstall: `node npm-scripts.js postinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mediasoup@3.4.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\iris\AppData\Roaming\npm-cache\_logs\2019-12-11T12_29_19_542Z-debug.log

Please get mediasoup v3 branch (without the demo I mean), ensure you satisfy requirements [*] and run “npm install”.

[*] https://mediasoup.org/documentation/v3/mediasoup/installation/#windows

Thanks for the answer.

Yes, I have reinstalled all the software and configured it according to the standard of [*]. However, my installation in a new project (only executed npm init) still reported an error.

At the same time, there is a problem. I didn’t find the MSBuild.exe application under the C:, so I used the application in VS 2017. I don’t know if it was caused by this problem.The specific contents are as follows:

QQ图片20191212110117

What’s the error now? MSBuild.exe should be in the Vistual Studio's install path which kind like that C:\Program Files (x86)\MSBuild\14.0\Bin, otherwise it’s maybe some Vistual Studio's components not installed.

It’s the same error as the first one above:

And Bin folder and executable MSBuild.exe application are not found in C:
image
I didn’t install it by default. I installed VS on disk D:.

(I want to be clearer and more intuitive, so use pictures)

Heyo,

I’m also experiencing this same error
OS: Windows 10 Version 1809
Node: v12.16.1
Python: 2.7.15
Visual Studio 2019

I’ve also set the Enviornment Variable and added MSBuild to my path. I found it in:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin

The full install output is:

npm install --save mediasoup
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

> clang-tools-prebuilt@0.1.4 postinstall C:\Users\rclark\Desktop\Cryb\GLaDOS\node_modules\clang-tools-prebuilt
> node install.js

C:\Users\rclark\Desktop\Cryb\GLaDOS\node_modules\clang-tools-prebuilt\install.js:24
if (!platforms[platform]) throw new Error('Unknown platform: ' + platform)
                          ^

Error: Unknown platform: win32
    at Object.<anonymous> (C:\Users\rclark\Desktop\Cryb\GLaDOS\node_modules\clang-tools-prebuilt\install.js:24:33)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47

> mediasoup@3.4.12 postinstall C:\Users\rclark\Desktop\Cryb\GLaDOS\node_modules\mediasoup
> node npm-scripts.js postinstall

npm-scripts.js [INFO] running task "postinstall"
npm-scripts.js [INFO] executing command: python ./worker/scripts/configure.py --format=msvs -R mediasoup-worker
['--format=msvs', '-R', 'mediasoup-worker', 'worker\\mediasoup-worker.gyp', '-I', 'worker\\common.gypi', '--depth=worker', '-Dhost_arch=AMD64', '-Dtarget_arch=AMD64', '-Dopenssl_fips=', '-Dmediasoup_asan=false', '-Dnode_byteorder=little']
Warning: Missing input files:
worker\deps\libwebrtc\libwebrtc\modules\remote_bitrate_estimator\bwe_defines.h
npm-scripts.js [INFO] executing command: MSBuild ./worker/mediasoup-worker.sln /p:Configuration=Release
Microsoft (R) Build Engine Version 2.0.50727.9031
[Microsoft .NET Framework, Version 2.0.50727.9040]
Copyright (C) Microsoft Corporation 2005. All rights reserved.

./worker/mediasoup-worker.sln(1): Solution file error MSB5014: File format version is not recognized.  MSBuild can only read solution files between versions 7.0 and 9.0, inclusive.
npm WARN glados@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: clang-tools-prebuilt@0.1.4 (node_modules\clang-tools-prebuilt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: clang-tools-prebuilt@0.1.4 postinstall: `node install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mediasoup@3.4.12 postinstall: `node npm-scripts.js postinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mediasoup@3.4.12 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\rclark\AppData\Roaming\npm-cache\_logs\2020-02-21T17_26_27_793Z-debug.log

Does anyone fixed this issue? I got error below:

clang-tools-prebuilt@0.1.4 postinstall E:\code\mediasoup-demo\server\node_modules\clang-tools-prebuilt
node install.js

E:\code\mediasoup-demo\server\node_modules\clang-tools-prebuilt\install.js:24
if (!platforms[platform]) throw new Error('Unknown platform: ’ + platform)
^

Error: Unknown platform: win32
at Object. (E:\code\mediasoup-demo\server\node_modules\clang-tools-prebuilt\install.js:24:33)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: clang-tools-prebuilt@0.1.4 (node_modules\clang-tools-prebuilt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: clang-tools-prebuilt@0.1.4 postinstall: node install.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

up to date in 8.092s

There are some issues installing mediasoup in Windows due to bugs in GYP:

We’ll address all these issues when we migrate from GYP to CMake, but this will take some time. Try to use mediasoup in Linux/OSX (or in Docker) for now.

I also encountered with this problem. I did some fix with my fork here: https://github.com/GraphCeppelin/mediasoup

Works as temporary solution until it will be fixed.
To install: npm install git+https://github.com/GraphCeppelin/mediasoup.git
It requires VS 2019 (vs142 build toolset). So you can download community version.

5 Likes

Could you please elaborate in detail. I did fork the https://github.com/versatica/mediasoup-demo mediasoup office demo in windows machine. I’m not able to install on it. Where should I run above npm install git+https://github.com/GraphCeppelin/mediasoup.git.

Tried to install and got same error. Does this still work for you or was there other steps?

I think the best and working solution, you have to activate and use the Linux environment in your windows 10
Step 1 - https://docs.microsoft.com/en-us/windows/wsl/install-win10
1.1 - after completed all, open Windows Terminal, then type/run “wsl” to switch to the Linux environment before going to Step 2.
Step 2 - https://mediasoup.org/documentation/v2/mediasoup/installation/

the linux subsystem is definitely the best solution here - works well and you can still code using your favorite windows editor