Hello,

I am trying to run npm install in Netbeans but I can't get it to work. I
have the node and npm paths configured in the Netbeans settings. I then
created a new "NodeJS Application" project and right clicked on the project
to choose "npm install". The Netbeans console shows the following:

```
"/bin/bash" "-lc" "\"/opt/homebrew/bin/npm\" \"install\""
Done.
env: node: No such file or directory
```

I have Node and npm installed using Homebrew. Both work as expected from
the terminal. For example:

```
% cd NodeJsWebApplication
% npm install
up to date, audited 1 package in 132ms
found 0 vulnerabilities
```

Paths shown via terminal:
```
% which npm
/opt/homebrew/bin/npm

% ls -al /opt/homebrew/bin/npm
lrwxr-xr-x  1 myuser  admin  29  1 Dec 10:24 /opt/homebrew/bin/npm ->
../Cellar/node/21.2.0/bin/npm

% which node
/opt/homebrew/bin/node

% ls -al /opt/homebrew/bin/node
lrwxr-xr-x  1 myuser  admin  30  1 Dec 10:24 /opt/homebrew/bin/node ->
../Cellar/node/21.2.0/bin/node

% cd /opt/homebrew/Cellar/node/21.2.0/bin
% ls -al
-r-xr-xr-x   1 myuser  admin  54115968  1 Dec 10:07 node
lrwxr-xr-x   1 myuser  admin        49  1 Dec 10:07 npm ->
/opt/homebrew/lib/node_modules/npm/bin/npm-cli.js
lrwxr-xr-x   1 myuser  admin        49  1 Dec 10:07 npx ->
/opt/homebrew/lib/node_modules/npm/bin/npx-cli.js
```


*System details:*
Product Version: Apache NetBeans IDE 19
Java: 17.0.8.1; OpenJDK 64-Bit Server VM 17.0.8.1+0
Runtime: OpenJDK Runtime Environment 17.0.8.1+0
System: Mac OS X version 14.1.1 running on aarch64;


I'd appreciate any ideas to solve this.

Thanks,
Bob

Reply via email to