# Fix \`npm install\` error with some languages \(\#12087\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/b451af49069bcbb88b3eb118a340a5ba1e587933)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: b451af49069bcbb88b3eb118a340a5ba1e587933

Requested commit: b451af49069bcbb88b3eb118a340a5ba1e587933

Commit: b451af49069bcbb88b3eb118a340a5ba1e587933

Tree: 84e980bf0e528803d5f2f2fa6cdca6f44ebce595

Author: 张小白

Committer: GitHub

## Message

```
Fix `npm install` error with some languages (#12087)

If you have already installed `node` using `brew install node`, you are
fine. If you did not install `node` on you local machine, it fails.

The `node_binary` path is actually not included in environment variable.
When run `npm install`, some extensions like `eslint`, may run some
commands like `sh -c node .....`. Since `node_binary` path is not
included in `PATH` variable, `sh -c node ...` will fail complaining that
"command not found". If you have installed `node` before, `node` is
already included in `PATH`, so you are fine. If not, it fails.

Closes #11890

Release Notes:

- Fixed Zed's internal Node runtime not being put in `$PATH` correctly
when running language servers and other commands with `node`.
([#11890](https://github.com/zed-industries/zed/issues/11890))

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
```

## Parents

- [71a94c775b752af59b9be7f41e78afef5e63615e](https://git.cafe/gitcafe/zed/commit/71a94c775b752af59b9be7f41e78afef5e63615e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/b451af49069bcbb88b3eb118a340a5ba1e587933?format=markdown)
