npm install "error" in mediasoup-demo/server

Hi , I have followed and installed the required dependencies, but when i am trying to do npm install i am getting the following errors-

PS C:\Users\krish\Downloads\demoV3\mediasoup-demo\server> npm install
npm WARN deprecated source-map-url@0.4.1
npm WARN deprecated urix@0.1.0
npm WARN deprecated source-map-resolve@0.5.3
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated resolve-url@0.2.1
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\krish\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > mediasoup@3.11.7 postinstall
npm ERR! > node npm-scripts.js postinstall
npm ERR!
npm ERR! npm-scripts.js [INFO] running task “postinstall”
npm ERR! npm-scripts.js [INFO] executeCmd(): make -C worker
npm ERR! make: Entering directory `/c/Users/krish/AppData/Local/npm-cache/_cacache/tmp/git-clone0s2Ejg/worker’npm ERR! # Updated pip and setuptools are needed for meson. che/tmp/git-clone0s2Ejg/worker/out/pip meson==0.61.5 ninja==1.10.2.4
che/tmp/git-clone0s2Ejg/worker/out/pip meson==0.61.5 ninja==1.10.2.4
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! - Cannot open - Cannot open - Cannot openmake: *** [meson-ninja] Error 1npm ERR! npm-scripts.js [ERROR] executeCmd() failed, exiting: Error: Command failed: make -C workernpm ERR! npm ERR! code 1npm ERR! npm ERR! path C:\Users\krish\AppData\Local\npm-cache_cacache\tmp\git-clone0s2Ejgnpm ERR! npm ERR! command failednpm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node npm-scripts.js postinstallnpm ERR!npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\krish\AppData\Local\npm-cache_logs\2023-01-27T09_39_27_186Z-debug.log

npm ERR! A complete log of this run can be found in:npm ERR! C:\Users\krish\AppData\Local\npm-cache_logs\2023-01-27T09_39_51_794Z-debug.log

Make sure to install all the required things mentioned in docs, I think you are on windows then additionally you will have to install required things for windows mentioned in docs, before doing npm install:

If you have done all this then show the versions of all of these things from your side: make, node, python, gcc.

I have followed that doc for all the required dependency for windows, here are the versions-
node - v17.0.1
python- 3.11.1
GNU Make 3.81

Show me screenshot from terminal with command make -v.

First lets see this error, there is some solution mentioned here, kindly try that:

Also install in some other directory than C:, i.e D: or E: etc to make sure you don’t have permission related issues.

Has the problem been solved?

Most likely the same problem as here: Cant yarn install anymore windows 10

npm verb cwd /home/huangqb/mediasoup/mediasoup-demo/server
npm verb Linux 5.19.0-37-generic
npm verb node v18.15.0
npm verb npm v9.5.0
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /home/huangqb/.nvm/versions/node/v18.15.0/bin/node /home/huangqb/.nvm/versions/node/v18.15.0/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/home/huangqb/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > mediasoup@3.11.13 postinstall
npm ERR! > node npm-scripts.js postinstall
npm ERR!
npm ERR! npm-scripts.js [INFO] running task “postinstall”
npm ERR! npm-scripts.js [INFO] buildWorker()
npm ERR! npm-scripts.js [INFO] executeCmd(): make -C worker
npm ERR! make: Entering directory ‘/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker’
npm ERR! # Updated pip and setuptools are needed for meson.
npm ERR! # --system is not present everywhere and is only needed as workaround for
npm ERR! # Debian-specific issue (copied from Without --system build fails by sac · Pull Request #33 · gluster/gstatus · GitHub),
npm ERR! # fallback to command without --system if the first one fails.
npm ERR! /usr/bin/python3 -m pip install --system --target=/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip pip setuptools ||
npm ERR! /usr/bin/python3 -m pip install --target=/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip pip setuptools ||
npm ERR! echo “Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package”
npm ERR! Collecting pip
npm ERR! Using cached pip-23.0.1-py3-none-any.whl (2.1 MB)
npm ERR! Collecting setuptools
npm ERR! Using cached setuptools-67.6.0-py3-none-any.whl (1.1 MB)
npm ERR! Installing collected packages: setuptools, pip
npm ERR! Successfully installed pip-23.0.1 setuptools-67.6.0
npm ERR! # Install meson and ninja using pip into custom location, so we don’t
npm ERR! # depend on system-wide installation.
npm ERR! /usr/bin/python3 -m pip install --upgrade --target=/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip meson==0.61.5 ninja==1.10.2.4
npm ERR! Collecting meson==0.61.5
npm ERR! Using cached meson-0.61.5-py3-none-any.whl (862 kB)
npm ERR! Collecting ninja==1.10.2.4
npm ERR! Using cached ninja-1.10.2.4-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (120 kB)
npm ERR! Installing collected packages: ninja, meson
npm ERR! Successfully installed meson-0.61.5 ninja-1.10.2.4
npm ERR! /home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/bin/meson setup
npm ERR! --prefix /home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/Release
npm ERR! --bindir ‘’
npm ERR! --libdir ‘’
npm ERR! --buildtype release
npm ERR! -Db_ndebug=true
npm ERR! -Db_pie=true
npm ERR! -Db_staticpic=true
npm ERR! --reconfigure
npm ERR! “”
npm ERR! /home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/Release/build ||
npm ERR! /home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/bin/meson setup
npm ERR! --prefix /home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/Release
npm ERR! --bindir ‘’
npm ERR! --libdir ‘’
npm ERR! --buildtype release
npm ERR! -Db_ndebug=true
npm ERR! -Db_pie=true
npm ERR! -Db_staticpic=true
npm ERR! “”
npm ERR! /home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/Release/build
npm ERR! The Meson build system
npm ERR! Version: 0.61.5
npm ERR! Source dir: /home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker
npm ERR! Build dir: /home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/Release/build
npm ERR! Build type: native build
npm ERR! Project name: mediasoup-worker
npm ERR! Project version: undefined
npm ERR! C compiler for the host machine: cc (gcc 11.3.0 “cc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0”)
npm ERR! C linker for the host machine: cc ld.bfd 2.38
npm ERR! C++ compiler for the host machine: c++ (gcc 11.3.0 “c++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0”)
npm ERR! C++ linker for the host machine: c++ ld.bfd 2.38
npm ERR! Host machine cpu family: x86_64
npm ERR! Host machine cpu: x86_64
npm ERR! Downloading openssl source from https://www.openssl.org/source/openssl-3.0.7.tar.gz
npm ERR! Download size: 15107575
npm ERR! Downloading: …
npm ERR! Downloading openssl patch from https://wrapdb.mesonbuild.com/v2/openssl_3.0.7-1/get_patch
npm ERR! Download size: 11462134
npm ERR! Downloading: …
npm ERR!
npm ERR! Executing subproject openssl
npm ERR!
npm ERR! openssl| Project name: openssl
npm ERR! openssl| Project version: 3.0.7
npm ERR! openssl| C compiler for the host machine: cc (gcc 11.3.0 “cc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0”)
npm ERR! openssl| C linker for the host machine: cc ld.bfd 2.38
npm ERR! openssl| Run-time dependency threads found: YES
npm ERR! openssl| Program as found: YES (/usr/bin/as)
npm ERR! openssl| Message: OpenSSL is configured with ASM support
npm ERR! openssl| Library dl found: YES
npm ERR! openssl| Build targets in project: 3
npm ERR! openssl| Subproject openssl finished.
npm ERR!
npm ERR! Downloading nlohmann_json source from https://github.com/nlohmann/json/releases/download/v3.10.5/include.zip
npm ERR! Download size: 260679
npm ERR! Downloading: …
npm ERR!
npm ERR! Executing subproject nlohmann_json
npm ERR!
npm ERR! nlohmann_json| Project name: nlohmann_json
npm ERR! nlohmann_json| Project version: 3.10.5
npm ERR! nlohmann_json| C++ compiler for the host machine: c++ (gcc 11.3.0 “c++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0”)
npm ERR! nlohmann_json| C++ linker for the host machine: c++ ld.bfd 2.38
npm ERR! nlohmann_json| Build targets in project: 3
npm ERR! nlohmann_json| Subproject nlohmann_json finished.
npm ERR!
npm ERR! Downloading libuv source from https://dist.libuv.org/dist/v1.44.2/libuv-v1.44.2.tar.gz
npm ERR! Download size: 1301690
npm ERR! Downloading: …
npm ERR! Downloading libuv patch from https://wrapdb.mesonbuild.com/v2/libuv_1.44.2-1/get_patch
npm ERR!
npm ERR! meson.build:176:0: ERROR: Unhandled python exception
npm ERR!
npm ERR! This is a Meson bug and should be reported!
npm ERR! make: Leaving directory ‘/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker’
npm ERR! npm verb cli /home/huangqb/.nvm/versions/node/v18.15.0/bin/node /home/huangqb/.nvm/versions/node/v18.15.0/lib/node_modules/npm/bin/npm-cli.js
npm ERR! npm info using npm@9.5.0
npm ERR! npm info using node@v18.15.0
npm ERR! npm verb title npm install
npm ERR! npm verb argv “install” “–force” “–cache” “/home/huangqb/.npm” “–prefer-offline” “false” “–prefer-online” “false” “–offline” “false” “–no-progress” “–no-save” “–no-audit” “–include” “dev” “–include” “peer” “–include” “optional” “–no-package-lock-only” “–no-dry-run”
npm ERR! npm verb logfile logs-max:10 dir:/home/huangqb/.npm/_logs/2023-03-14T02_05_01_483Z-
npm ERR! npm verb logfile /home/huangqb/.npm/_logs/2023-03-14T02_05_01_483Z-debug-0.log
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR!
npm ERR! Usage:
npm ERR! /usr/bin/python3 -m pip install [options] [package-index-options] …
npm ERR! /usr/bin/python3 -m pip install [options] -r [package-index-options] …
npm ERR! /usr/bin/python3 -m pip install [options] [-e] …
npm ERR! /usr/bin/python3 -m pip install [options] [-e] …
npm ERR! /usr/bin/python3 -m pip install [options] <archive url/path> …
npm ERR!
npm ERR! no such option: --system
npm ERR! Directory does not contain a valid build tree:
npm ERR! /home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/Release/build
npm ERR! Traceback (most recent call last):
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/mesonmain.py”, line 148, in run
npm ERR! return options.run_func(options)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/msetup.py”, line 294, in run
npm ERR! app.generate()
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/msetup.py”, line 185, in generate
npm ERR! self._generate(env)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/msetup.py”, line 229, in _generate
npm ERR! intr.run()
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreter/interpreter.py”, line 2554, in run
npm ERR! super().run()
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 148, in run
npm ERR! self.evaluate_codeblock(self.ast, start=1)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 173, in evaluate_codeblock
npm ERR! raise e
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 166, in evaluate_codeblock
npm ERR! self.evaluate_statement(cur)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 181, in evaluate_statement
npm ERR! self.assignment(cur)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 566, in assignment
npm ERR! value = self.evaluate_statement(node.value)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 179, in evaluate_statement
npm ERR! return self.function_call(cur)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 454, in function_call
npm ERR! res = func(node, func_args, kwargs)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreterbase/decorators.py”, line 768, in wrapped
npm ERR! return f(*wrapped_args, **wrapped_kwargs)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreterbase/decorators.py”, line 115, in wrapped
npm ERR! return f(*wrapped_args, **wrapped_kwargs)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreterbase/decorators.py”, line 276, in wrapper
npm ERR! return f(*nargs, **wrapped_kwargs)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreter/interpreter.py”, line 800, in func_subproject
npm ERR! return self.do_subproject(args[0], ‘meson’, kwargs)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/interpreter/interpreter.py”, line 841, in do_subproject
npm ERR! subdir = r.resolve(subp_name, method)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/wrap/wrap.py”, line 345, in resolve
npm ERR! self.apply_patch()
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/wrap/wrap.py”, line 576, in apply_patch
npm ERR! path = self.get_file_internal(‘patch’)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/wrap/wrap.py”, line 560, in get_file_internal
npm ERR! self.download(what, cache_path)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/wrap/wrap.py”, line 535, in download
npm ERR! dhash, tmpfile = self.get_data(srcurl)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/wrap/wrap.py”, line 480, in get_data
npm ERR! resp = open_wrapdburl(urlstring)
npm ERR! File “/home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i/worker/out/pip/mesonbuild/wrap/wrap.py”, line 72, in open_wrapdburl
npm ERR! return T.cast(‘http.client.HTTPResponse’, urllib.request.urlopen(urllib.parse.urlunparse(url), timeout=REQ_TIMEOUT))
npm ERR! File “/usr/lib/python3.10/urllib/request.py”, line 216, in urlopen
npm ERR! return opener.open(url, data, timeout)
npm ERR! File “/usr/lib/python3.10/urllib/request.py”, line 525, in open
npm ERR! response = meth(req, response)
npm ERR! File “/usr/lib/python3.10/urllib/request.py”, line 634, in http_response
npm ERR! response = self.parent.error(
npm ERR! File “/usr/lib/python3.10/urllib/request.py”, line 557, in error
npm ERR! result = self._call_chain(*args)
npm ERR! File “/usr/lib/python3.10/urllib/request.py”, line 496, in _call_chain
npm ERR! result = func(*args)
npm ERR! File “/usr/lib/python3.10/urllib/request.py”, line 749, in http_error_302
npm ERR! return self.parent.open(new, timeout=req.timeout)
npm ERR! File “/usr/lib/python3.10/urllib/request.py”, line 519, in open
npm ERR! response = self._open(req, data)
npm ERR! File “/usr/lib/python3.10/urllib/request.py”, line 536, in _open
npm ERR! result = self._call_chain(self.handle_open, protocol, protocol +
npm ERR! File “/usr/lib/python3.10/urllib/request.py”, line 496, in _call_chain
npm ERR! result = func(*args)
npm ERR! File “/usr/lib/python3.10/urllib/request.py”, line 1391, in https_open
npm ERR! return self.do_open(http.client.HTTPSConnection, req,
npm ERR! File “/usr/lib/python3.10/urllib/request.py”, line 1352, in do_open
npm ERR! r = h.getresponse()
npm ERR! File “/usr/lib/python3.10/http/client.py”, line 1374, in getresponse
npm ERR! response.begin()
npm ERR! File “/usr/lib/python3.10/http/client.py”, line 318, in begin
npm ERR! version, status, reason = self._read_status()
npm ERR! File “/usr/lib/python3.10/http/client.py”, line 287, in _read_status
npm ERR! raise RemoteDisconnected(“Remote end closed connection without”
npm ERR! http.client.RemoteDisconnected: Remote end closed connection without response
npm ERR! make: *** [Makefile:110: setup] Error 2
npm ERR! npm-scripts.js [ERROR] executeCmd() failed, exiting: Error: Command failed: make -C worker
npm ERR! npm verb stack Error: command failed
npm ERR! npm verb stack at ChildProcess. (/home/huangqb/.nvm/versions/node/v18.15.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
npm ERR! npm verb stack at ChildProcess.emit (node:events:513:28)
npm ERR! npm verb stack at maybeClose (node:internal/child_process:1091:16)
npm ERR! npm verb stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! npm verb pkgid mediasoup@3.11.13
npm ERR! npm verb cwd /home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i
npm ERR! npm verb Linux 5.19.0-37-generic
npm ERR! npm verb node v18.15.0
npm ERR! npm verb npm v9.5.0
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /home/huangqb/.npm/_cacache/tmp/git-clone5iyk4i
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node npm-scripts.js postinstall
npm ERR! npm verb exit 1
npm ERR! npm verb code 1
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! /home/huangqb/.npm/_logs/2023-03-14T02_05_01_483Z-debug-0.log
npm verb exit 1
npm verb unfinished npm timer reify 1678759472267
npm verb unfinished npm timer reify:unpack 1678759489252
npm verb unfinished npm timer reifyNode:node_modules/mediasoup 1678759489268
npm verb code 1

npm ERR! A complete log of this run can be found in:
npm ERR! /home/huangqb/.npm/_logs/2023-03-14T02_04_32_091Z-debug-0.log

what should i do, can anyone help me!!!

Your error has nothing to do with the original in this topic. That was specific for the Windows installation. Yours seems to be just a failed dependency download: “Remote end closed connection without response”. Make sure that your internet connection is good and try again.