npm start error

I tried to do “npm start”

I got this error,
mediasoup-demo-server:INFO running 12 mediasoup Workers… +0ms
mediasoup:ERROR:Worker worker process failed [pid:undefined]: spawn C:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release\mediasoup-worker ENOENT +0ms
node:internal/errors:484
ErrorCaptureStackTrace(err);
^

Error: spawn C:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release\mediasoup-worker ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4058,
code: ‘ENOENT’,
syscall: ‘spawn C:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release\mediasoup-worker’,
path: ‘C:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release\mediasoup-worker’,
spawnargs: [
‘–logLevel=warn’,
‘–logTag=info’,
‘–logTag=ice’,
‘–logTag=dtls’,
‘–logTag=rtp’,
‘–logTag=srtp’,
‘–logTag=rtcp’,
‘–logTag=rtx’,
‘–logTag=bwe’,
‘–logTag=score’,
‘–logTag=simulcast’,
‘–logTag=svc’,
‘–logTag=sctp’,
‘–rtcMinPort=40000’,
‘–rtcMaxPort=49999’
]
}

I think mediasoup is not installed properly. Did you get any error with npm install?

Make sure you have the mediasoup-worker file in this path 'C:\mediasoup-demo\server\node_modules\mediasoup\worker\out\Release'. If it is not there, then there is some installation issue you will have to install it again, remove node_modules and do npm install again.

If the mediasoup-worker is found in the path mentioned above then you have some permission related issue.