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:

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/ --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 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”.


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:


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:
I didn’t install it by default. I installed VS on disk D:.

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