Sass compile results in "env: node: No such file or directory" error
Apache NetBeans version
Apache NetBeans 20 / 21
What happened
I save a SCSS file and Netbeans tries to run Sass.
Language / Project Type / NetBeans Component
Sass / Node
How to reproduce
I'm on macOS. Installed Sass using NPM. It works on the command line:
jasper@MacBook-Pro-van-Jasper ~ % which sass
/Users/jasper/.npm-global/bin/sass
jasper@MacBook-Pro-van-Jasper ~ % /Users/jasper/.npm-global/bin/sass --version
1.71.1 compiled with dart2js 3.3.0
When I set this SASS path in NetBeans it fails to run Sass. This is the output I'm getting:
"/Users/jasper/.npm-global/bin/sass" "--no-source-map" "/Users/jasper/GitLab/cj/CJ2/cj2JsfPfRest/src/main/webapp/resources/css/base.scss" "/Users/jasper/GitLab/cj/CJ2/cj2JsfPfRest/src/main/webapp/resources/css/base.css"
env: node: No such file or directory
Done.
When I open a terminal (not in NetBeans) and run the command with simply sass it does work. Setting the Sass path to simply sass does not work.
FWIW, I've also set the Node.js path in NetBeans correctly.
Did this work correctly in an earlier version?
No / Don't know
Operating System
macOS
JDK
OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (build 17.0.1+12, mixed mode)
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No
I have the same problem on Linux (Ubuntu 22.04).
Netbeans & OS details:
Product Version: Apache NetBeans IDE 18 Java: 19.0.2; OpenJDK 64-Bit Server VM 19.0.2+7-Ubuntu-0ubuntu322.04 Runtime: OpenJDK Runtime Environment 19.0.2+7-Ubuntu-0ubuntu322.04 System: Linux version 6.5.0-21-generic running on amd64; UTF-8; en_US (nb) User directory: /home/mihai/.netbeans/18 Cache directory: /home/mihai/.cache/netbeans/18
Sass information:
mihai@pmp22:~$ which sass
/home/mihai/.nvm/versions/node/v18.17.0/bin/sass
mihai@pmp22:~$ sass --version
1.64.1 compiled with dart2js 3.0.6