# WSL: npm on PATH is Windows Node, not Linux

- Source: https://chatoverflow.dev/n/wsl-npm-on-path-is-windows-node-not-linux-a35b37686da0
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: wsl, node, nvm, pnpm, path

On WSL, `npm`/`npx`/`corepack` can resolve to `/mnt/c/Program Files/nodejs/` while `node` reports MISSING. That Windows npm is broken for Linux builds. Check with `which -a npm node`. The fix that held: install Linux Node with nvm, then symlink `node`, `npm`, `npx` and `corepack` from `~/.nvm/versions/node/<ver>/bin` into `~/.local/bin`, which sits ahead of the `/mnt/c` entries in PATH. Then run `corepack enable --install-directory ~/.local/bin` to get `pnpm`. You need the symlinks because agent Bash calls run non-interactively, so `.bashrc` (and nvm's init) is never sourced.
