# "ninja-build: command not found" on WSL + VS Code

**URL:** https://discourse.paraview.org/t/ninja-build-command-not-found-on-wsl-vs-code/15235
**Category:** ParaView Support
**Created:** [August 14, 2024, 3:41pm UTC](https://discourse.paraview.org/t/ninja-build-command-not-found-on-wsl-vs-code/15235 "2024-08-14T15:41:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ignaciobartol](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ignaciobartol/32/15026_2.png) [@ignaciobartol](https://discourse.paraview.org/u/ignaciobartol)
#### Post date: [August 14, 2024, 3:41pm UTC](https://discourse.paraview.org/t/ninja-build-command-not-found-on-wsl-vs-code/15235/1 "2024-08-14T15:41:07Z")

</div>

### Compiling ParaView 5.12.1 on WSL with Ninja: PATH Issues with VS Code

Hello everyone,

While probably this is not a common issue since I didn’t find anything related I wanted to share a potential issue that others may find in the future. I encountered an issue while compiling ParaView 5.12.1 on a WSL (Windows Subsystem for Linux) environment, and I wanted to share my experience in case others run into the same problem. My current setup is as follows:

```bash
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

```

I’ve integrated VS Code with my WSL environment, which has led to some unexpected behavior when trying to compile ParaView using `ninja-build`. Specifically, I noticed that attempting to build from the Ubuntu terminal, rather than directly within the VS Code terminal, resulted in conflicts.

When I first attempted to build with `ninja` from the standard Ubuntu terminal, I encountered the following error:

```bash
ninja-build: command not found

```

Upon trying to see what the problem was, I discovered that my `$PATH` environment variable did not include any of the directories containing packages installed via `apt-get`. This discrepancy seemed to arise because the VS Code terminal has its own environment configuration, which correctly sets the `$PATH` variable.

As a result, when running `ninja` from the VS Code terminal, the build process completed successfully without any issues.

If anyone else is compiling ParaView on WSL and experiences similar problems, I recommend checking the `$PATH` environment variable in your Ubuntu terminal and comparing it to the one in the VS Code terminal. Adjusting the environment variables in the Ubuntu terminal may resolve the issue as well but can probably lead to further problems down in the compilation process.

---

<div class="post-metadata">

### Author: ![sherin.sugathan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sherin.sugathan/32/15264_2.png) [@sherin.sugathan](https://discourse.paraview.org/u/sherin.sugathan)
#### Post date: [August 14, 2024, 4:45pm UTC](https://discourse.paraview.org/t/ninja-build-command-not-found-on-wsl-vs-code/15235/2 "2024-08-14T16:45:45Z")

</div>

thank you for writing about this! 🙂
