/usr/bin/env: node: No such file or directory
I installed my Node in "$HOME/Apps/node" and also performed local install ("npm install" things without "-g").
This leads me to the "node" and "npm" binaries to be in "$HOME/Apps/node/bin" and the packages binaries to be symlinked from "$HOME/node_modules/.bin".
Adding "$HOME/Apps/node/bin" and "$HOME/node_modules/.bin" to the PATH allows me calling "node" or "npm" from a terminal, but when comes the time that my Emacs-GTK needs to call "node" or "npm", I get "/usr/bin/env: node: No such file or directory" dispit ethe fact I already made this:
(add-to-list 'exec-path "/home/mihamina/Apps/node/bin") (add-to-list 'exec-path "/home/mihamina/node_modules/.bin")
For information, this is happening when it tries to launch "iph" from Intelephense.
So this basically means that the ".bashrc" file has not been sourced (after all, I did not launch BASH), and Intelephense does not consider the Emacs "exec-path" configuration.
The only solution I made is to append "$HOME/Apps/node/bin" and "$HOME/node_modules/.bin" at system boot time.
To achieve this, I create the "/etc/profile.d/mihamina.sh" and put the following lines in:
append_path '/home/mihamina/Apps/composer/bin' append_path '/home/mihamina/Apps/symfony/bin' append_path '/home/mihamina/node_modules/.bin' append_path '/home/mihamina/Apps/node/bin' append_path '/home/mihamina/Apps/deno/bin' append_path '/home/mihamina/.local/bin'
Reboot and enjoy!