apache / apache/netbeans

Sass compile results in "env: node: No such file or directory" error

Open
#7,095 2 comments 0 reactions 0 assignees View on GitHub
CSS kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### 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

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Sass invocation shown in the report on macOS, using the configured Sass path and Node.js path. Compare the NetBeans environment with the terminal environment, especially the reported `env: node: No such file or directory` error. Done means saving the SCSS file compiles it successfully from NetBeans.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.