build.ninja error from VSCode but works OK from terminal

geedotk
Posts: 8
Joined: Sat Feb 04, 2023 9:39 pm

build.ninja error from VSCode but works OK from terminal

Postby geedotk » Tue Feb 14, 2023 12:25 am

I have VS Code v1.75 and I've installed the Espressif IDF exension v1.5.1 on a Windows 11 machine

After configuring the ESP-IDF extension, I tried to build the hello world example. I get this Ninja error
Executing task: ninja

ninja: error: loading 'build.ninja': The system cannot find the file specified.

* The terminal process "C:\Program Files\PowerShell\7\pwsh.exe -Command ninja " terminated with exit code: 1.
If I go to the terminal, I can run "idf.py build" and it builds without a problem, but trying to do an "ESP-IDF: Build your project" from VSCode results in the ninja error.

Why can't I build from VSCode when the ESP-IDF seems to work fine from the terminal?

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: build.ninja error from VSCode but works OK from terminal

Postby ESP_bignacio » Fri Feb 17, 2023 8:17 am

Seems there might be an issue with your configuration. Check the troubleshooting section and share the required information.

geedotk
Posts: 8
Joined: Sat Feb 04, 2023 9:39 pm

Re: build.ninja error from VSCode but works OK from terminal

Postby geedotk » Fri Feb 17, 2023 7:19 pm

I believe I figured out a solution; VSCode didn't seem to like the location of my PowerShell installation at "C:\Program Files\PowerShell\7\pwsh.exe". It probably had to do with the space in the path. I reinstalled it at "C:\PowerShell" and now it builds ok. I still don't understand why it would build ok from the terminal though.

Who is online

Users browsing this forum: No registered users and 18 guests