# Partly solved: Could not detect Ninja v1.8.2 or newer

**URL:** <https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464>\
**Category:** mediasoup libraries\
**Created:** [October 21, 2021, 8:37am UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464 "2021-10-21T08:37:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 21, 2021, 8:37am UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/1 "2021-10-21T08:37:58Z")

</div>

I am a total beginner so please forgive me for asking something stupid!  
running npm install of our server application built with mediasoup, it fails with Could not detect Ninja v1.8.2 or newer  
Setup computer #1: MacMini M1, macOS 11.4, node 17.0.1, npm 6.14.15, mediasoup 3.9.0, probably missing something relevant  
I can build locally on a MacBook Pro M1 without any issues, the same versions except macOS 11.2  
Installing on the same computer has worked without any issues, last time 2 weeks ago but the day before yesterday it failed  
Another MacMini #2 which I have also installed the application before fails with the same error.  
Some updates have been done on #1 but is not obviously connected since #2 also fails now  
Uninstalled v16, not sure which, and installed v17, same error but explicitly stated in v17  
The only common denominator is that both computers are at the same location, which doesn’t make any sense. #1 is outside the firewall, #2 is inside the local network.  
Works for everyone building locally…  
There has been three other people more competent than me looking at it but without finding the cause  
Any suggestions?  
And how do I upload the error log?

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/nazar-pc/32/369_2.png) [@nazar-pc](https://mediasoup.discourse.group/u/nazar-pc)\
**Post date:** [October 21, 2021, 8:58am UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/2 "2021-10-21T08:58:07Z")

</div>

That usually means something unexpected happened to the build system used for worker. Have you tried to delete `node_modules` and see if the issue repeats?

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 21, 2021, 9:00am UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/3 "2021-10-21T09:00:07Z")

</div>

Yes many times, many variations of the same build, variations of mediasoup version, 3.7.17 and 3.9.0, on two different machines, works locally on my macbook pro m1 every time, has worked on the target computer every time until now, has worked every time on #2 until now

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 21, 2021, 9:05am UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/4 "2021-10-21T09:05:18Z")

</div>

So one thing that is different is the network, mediasoup makes calls to e.g. [mesonbuild.com](http://mesonbuild.com) if that could matter? It seems like such a long shot though, especially since #1 is outside and #2 is inside firewall.

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 21, 2021, 9:23am UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/5 "2021-10-21T09:23:30Z")

</div>

And here is a link to the error log: [https://docs.google.com/document/d/1JxFQ7O5ZkkNnCwgp4SQ9iup3dwngKVU8b4ouT2CKWRI/edit?usp=sharing](https://docs.google.com/document/d/1JxFQ7O5ZkkNnCwgp4SQ9iup3dwngKVU8b4ouT2CKWRI/edit?usp=sharing)

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/nazar-pc/32/369_2.png) [@nazar-pc](https://mediasoup.discourse.group/u/nazar-pc)\
**Post date:** [October 21, 2021, 10:50am UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/6 "2021-10-21T10:50:04Z")

</div>

You can’t get this error in 3.7.17, but in 3.9.0 Ninja will be downloaded through PIP and Meson will be used to download dependencies, so Internet connection must be working in that environment.

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 21, 2021, 12:18pm UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/7 "2021-10-21T12:18:27Z")

</div>

Some more info:  
updated my macbook on which it installs correctly to macOS 11.6, still working  
The difference I have found is the versions of clang. My computer has 12.0.5, the ones that fails have 13.0  
UPDATE: managed to downgrade, now 12.0.5 on #2 but still failing

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/nazar-pc/32/369_2.png) [@nazar-pc](https://mediasoup.discourse.group/u/nazar-pc)\
**Post date:** [October 21, 2021, 1:47pm UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/8 "2021-10-21T13:47:26Z")

</div>

I don’t see “Ninja” in that log 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 21, 2021, 1:50pm UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/9 "2021-10-21T13:50:13Z")

</div>

Thanks for responding, I really appreciate it! And sorry for not being 100% clear  
The error message was from the terminal, did not search for it in the error log

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 21, 2021, 2:04pm UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/10 "2021-10-21T14:04:16Z")

</div>

Here is the terminal error

> **[Terminal error](https://docs.google.com/document/d/1pZOy_s9OHXdmLTjrqoS7-QyHTgt4pFQfcNH7Y8Uwfzk/edit?usp=sharing)**
>
> Last login: Thu Oct 21 14:41:16 on console activeent@fm-mac-38 ~ % npm cache clean --force npm WARN using --force Recommended protections disabled. activeent@fm-mac-38 ~ % gcc --version Configured with:...

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/nazar-pc/32/369_2.png) [@nazar-pc](https://mediasoup.discourse.group/u/nazar-pc)\
**Post date:** [October 21, 2021, 4:48pm UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/11 "2021-10-21T16:48:33Z")

</div>

What is PIP version on the machine that works? Here it warns that the version you have is 19.2.3 back from 2019, which is pretty old, I’m wondering if working setup has newer version.

UPD: Also if you can attach meson log from `node_modules/mediasoup/worker/out/Release/meson-logs/meson-log.txt` it would help (please use pastebin instead of Google Drive if possible though).

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 21, 2021, 7:09pm UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/12 "2021-10-21T19:09:16Z")

</div>

The one that is broken #1 has 21.3, the one that WORKS gives a “command not found”…

I used drive since the first log was too big and required a pro account. The node\_modules directory is deleted automatically when npm fails so I don’t have that file

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 22, 2021, 8:18am UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/13 "2021-10-22T08:18:35Z")

</div>

Update: I got some help and npm install now works on machine #1, but there is still a lot unclear for me.

The reason it started failing was most likely the release of 3.9.0. Our build was configured to use the latest 3.\*, will never do that mistake again.

However, 3.9.0 installs and runs on my macbook pro M1, same os, processor, npm etc. This is what the developer said:

“The problem on the macmini was that the clang x86\_64 compiler was launched with aarch64 target and that is not supported”

Or something similar.

So it works now but would of course love to know:  
what can be the reason for the differences between the machines?  
Is there anything to do about it?

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/nazar-pc/32/369_2.png) [@nazar-pc](https://mediasoup.discourse.group/u/nazar-pc)\
**Post date:** [October 22, 2021, 11:05am UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/14 "2021-10-22T11:05:49Z")

</div>

3.9.0 switched build system, so things have changed significantly. As to x86-64 compiler on aarch64 target… I honestly don’t know too much about it, feels like one of the rough edges in transition to ARM on macOS.

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 22, 2021, 1:43pm UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/15 "2021-10-22T13:43:39Z")

</div>

Thanks for your reply, yeah one could expect some rough edges in that transition

---

<div class="post-metadata">

**Author:** ![deepso7](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/deepso7/32/1118_2.png) [@deepso7](https://mediasoup.discourse.group/u/deepso7)\
**Post date:** [November 5, 2022, 11:35am UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/16 "2022-11-05T11:35:27Z")

</div>

Facing the same issue on Ubuntu 20.04.5  
here’s my meson-log

> **[meson-log.txt - Pastebin](https://pastebin.pl/view/4d2696c0)**
>
> Pastebin.pl is a website where you can store code/text online for a set period of time and share to anybody on earth

---

<div class="post-metadata">

**Author:** ![kenyasue](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/kenyasue/32/1804_2.png) [@kenyasue](https://mediasoup.discourse.group/u/kenyasue)\
**Post date:** [November 5, 2022, 11:51am UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/17 "2022-11-05T11:51:25Z")

</div>

This error appeared today in both my dev environment ( Ubuntu22.04 ) and dev server ( Ubuntu 22.04 )

---

<div class="post-metadata">

**Author:** ![havfo](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/havfo/32/268_2.png) [@havfo](https://mediasoup.discourse.group/u/havfo)\
**Post date:** [November 5, 2022, 12:19pm UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/18 "2022-11-05T12:19:36Z")

</div>

Same for me on a fresh Debian stable install today.

---

<div class="post-metadata">

**Author:** ![vpalmisano](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/vpalmisano/32/43_2.png) [@vpalmisano](https://mediasoup.discourse.group/u/vpalmisano)\
**Post date:** [November 5, 2022, 2:56pm UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/19 "2022-11-05T14:56:11Z")

</div>

The latest ninja version (1.11.1) triggers a segfault on Ubuntu LTS.  
I solved manually installing the previous version:

```auto
/usr/bin/python3 -m pip install --upgrade --target=worker/out/pip meson==0.61.5 ninja==1.10.2.4
npm run worker:build

```

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [November 5, 2022, 3:12pm UTC](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464/20 "2022-11-05T15:12:31Z")

</div>



[Next page](https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464.md?page=2)
