Issue creating worker with node

I have an issue starting a worker with my new project: GitHub - Collaborative-IoT/Lancelot: Voice server for Collaborative-IoT audio chat.

The issue occurs:Lancelot/startMediasoup.ts at master · Collaborative-IoT/Lancelot · GitHub

Here is the issue output: `
Error: spawn C:\Users\imkxr\Repos\Collaborative\Lancelot\node_modules\mediasoup\worker\out\Release\mediasoup-worker ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: ‘ENOENT’,
syscall: ‘spawn C:\Users\imkxr\Repos\Collaborative\Lancelot\node_modules\mediasoup\worker\out\Release\mediasoup-worker’,
path: ‘C:\Users\imkxr\Repos\Collaborative\Lancelot\node_modules\mediasoup\worker\out\Release\mediasoup-worker’,
spawnargs: [
‘–logLevel=debug’,
‘–logTag=info’,
‘–logTag=ice’,
‘–logTag=dtls’,
‘–logTag=rtp’,
‘–logTag=srtp’,
‘–logTag=rtcp’,
‘–rtcMinPort=40000’,
‘–rtcMaxPort=49999’
]
}
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^

Error: spawn C:\Users\imkxr\Repos\Collaborative\Lancelot\node_modules\mediasoup\worker\out\Release\mediasoup-worker ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: ‘ENOENT’,
syscall: ‘spawn C:\Users\imkxr\Repos\Collaborative\Lancelot\node_modules\mediasoup\worker\out\Release\mediasoup-worker’,
path: ‘C:\Users\imkxr\Repos\Collaborative\Lancelot\node_modules\mediasoup\worker\out\Release\mediasoup-worker’,
spawnargs: [
‘–logLevel=debug’,
‘–logTag=info’,
‘–logTag=ice’,
‘–logTag=dtls’,
‘–logTag=rtp’,
‘–logTag=srtp’,
‘–logTag=rtcp’,
‘–rtcMinPort=40000’,
‘–rtcMaxPort=49999’
]
`

Things tried?

1.I made sure I have the requirements listed in the documentation
2.Deleted/Undeleted the node_modules folder of my project to reinstall the lib.
3.Navigated to C:\Users\imkxr\Repos\Collaborative\Lancelot\node_modules\mediasoup\node_modules and ran npm install.

The output of 3: `

mediasoup@3.9.8 postinstall
node npm-scripts.js postinstall
npm-scripts.js [INFO] running task “postinstall”
npm-scripts.js [INFO] executing command: node npm-scripts.js worker:build
npm-scripts.js [INFO] running task “worker:build”
npm-scripts.js [INFO] executing command: make -C worker
make × ERR Missing Makefile / Bakefile
make i info Run “make init” to generate a Makefile.
npm-scripts.js [INFO] executing command: make clean-build -C worker
make × ERR Missing Makefile / Bakefile
make i info Run “make init” to generate a Makefile.
npm-scripts.js [INFO] executing command: make clean-subprojects -C worker
make × ERR Missing Makefile / Bakefile
make i info Run “make init” to generate a Makefile.
npm-scripts.js [INFO] executing command: make clean-pip -C worker
make × ERR Missing Makefile / Bakefile
make i info Run “make init” to generate a Makefile.

up to date, audited 522 packages in 2s

80 packages are looking for funding
run npm fund for details

5 moderate severity vulnerabilities

To address all issues (including breaking changes), run:
npm audit fix --force

Run npm audit for details.`

Questions and Additional

Is there anything else to check for worker failure?

It seems you have the global Node.js make package installed, which collides with MinGW/GNU make. Try npm uninstall -g make

Thanks for the insight, after removing the node.js make globally I have gotten the following from repeating step 3 of the section “things tried”.

npm-scripts.js [INFO] running task “postinstall”
npm-scripts.js [INFO] executing command: node npm-scripts.js worker:build
npm-scripts.js [INFO] running task “worker:build”
npm-scripts.js [INFO] executing command: make -C worker
make: Entering directory ‘C:/Users/imkxr/Repos/Collaborative/Lancelot/node_modules/mediasoup/worker’
process_begin: CreateProcess(NULL, dirname C:/Users/imkxr/Repos/Collaborative/Lancelot/node_modules/mediasoup/worker/Makefile, …) failed.
Makefile:7: pipe: No error
process_begin: CreateProcess(NULL, pwd, …) failed.
Makefile:37: pipe: No error
process_begin: CreateProcess(NULL, pwd, …) failed.
Makefile:56: pipe: No error
The system cannot find the path specified.
process_begin: CreateProcess(NULL, pwd, …) failed.
Makefile:62: pipe: Bad file descriptor
The system cannot find the path specified.
process_begin: CreateProcess(NULL, pwd, …) failed.
Makefile:62: pipe: Bad file descriptor
The system cannot find the path specified.
process_begin: CreateProcess(NULL, pwd, …) failed.
Makefile:65: pipe: Bad file descriptor
‘[’ is not recognized as an internal or external command,
operable program or batch file.
Updated pip and setuptools are needed for meson
process_begin: CreateProcess(NULL, pwd, …) failed.
Makefile:28: pipe: Bad file descriptor
process_begin: CreateProcess(NULL, # Updated pip and setuptools are needed for meson, …) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:57: meson-ninja] Error 2
make: Leaving directory ‘C:/Users/imkxr/Repos/Collaborative/Lancelot/node_modules/mediasoup/worker’
npm ERR! code 1
npm ERR! path C:\Users\imkxr\Repos\Collaborative\Lancelot\node_modules\mediasoup
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node npm-scripts.js postinstall

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\imkxr\AppData\Local\npm-cache_logs\2022-03-06T23_38_07_227Z-debug.log

Did you read and follow all instructions here top to bottom?: mediasoup :: Installation

It seems that you don’t have correct Make version installed.

Thanks for your help! Instead of running it locally on my windows machine I just placed it in a docker container with alpine which has build essentials.

If someone wants run locally, without docker, following @nazar-pc suggest, run: npm uninstall -g make, remove node_modules and run again installation