ESP-IDF ,build - error can´t find Ninja

Hi , i try to run a new project under the Espressif IOT Development framwork, when i try to run the build command i get this error and don´t really what i shall do ,
CMake Error: CMake was unable to find a build program corresponding to “Ninja”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

Hello, were you able to resolve this? I am seeing the same issue as well.

Turns out my Mac did not have Ninja installed, I thought I had it. Installed it wit homebrew.

I installed ninja with homebrew. However, I am still having the following error:

Executing task in folder MyFirstESP32C3: ninja <

ninja: error: loading ‘build.ninja’: No such file or directory
The terminal process “/bin/bash ‘-c’, 'ninja '” failed to launch (exit code: 1).

I’m not sure why there are so many people who have this issue (google it) and yet there never seems to be a solution that works for everyone. Am I missing something?

But this is then not using PlatformIO, but a custom task / raw ESP-IDF? Otherwise it would say something about PlatformIO run there. If you get an error there you have not correctly installed ESP-IDF according to their manual (Standard Toolchain Setup for Linux and macOS - ESP32 - — ESP-IDF Programming Guide latest documentation) which isntalls the ninja-build package…