I'm trying to compile my main.less
file to a main.css
file using phpstorm. However, I'm getting this error and the .less
file does not compile.
/usr/local/bin/lessc main.less
env: node: No such file or directory
Process finished with exit code 127
I'm using a mac and not sure why this is happening. It was working fine before, but I restarted my computer and now I'm getting this error.
Does anyone know why this is happening and how to fix?
Seems Node is not found in your PATH. PHPStorm normally uses your environment variables to figure out tools locations. But on MacOSX the environment variables differ between GUI applications and within the terminal. PHPStorm tries to load terminal environment on startup by executing the following command on startup:
-l -i -c '/Applications/PHPStorm.app/bin/printenv.py'
Seems this command either fails or can't retrieve all needed stuff. Can you check if the problem persists when running PHPStorm from system terminal (open -a /Applications/PHPStorm.app)? And one more thing to check: please open your Less file watcher settings, press ellipsis button in 'Environment variables' field to view variables - do you have 'Include parent environment variables' enabled? If this option is disabled, system environment variables won't be available to file watcher
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With