Tomáš Zato
Tomáš Zato

Reputation: 53307

CMake in VSCode cannot find Ninja even when it's on PATH - Error: spawn ninja ENOENT

I want to configure a CMake project in VSCode, ideally with Ninja. I am getting this error:

[main] Configuring project: MyProject
[proc] Executing command: C:\Users\XXXXX\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\bin\avr-gcc.exe -v
[proc] The command: ninja --version failed with error: Error: spawn ninja ENOENT
[proc] The command: ninja-build --version failed with error: Error: spawn ninja-build ENOENT
[proc] The command: make --version failed with error: Error: spawn make ENOENT
[main] Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable. Error: No usable generator found.

When I open command line and type ninja --version I get this output:

C:\>ninja --version
1.12.1

I restarted VS Code twice, it still cannot find the path. What else do I need to do to get it to locate the Ninja executable?

Upvotes: 0

Views: 94

Answers (0)

Related Questions