My question is similar to this question. I've installed node via nvm. (executable-find "node") returns .nvm/versions/node/v15.11.0/bin/node.
Entering node on eshell drops me into a node shell. But when I enter npm in an eshell, I'm fed
/usr/bin/env: ‘node’: No such file or directory
Similarly, the command nvm returns nvm: command not found.
On a zsh terminal, the above commands work as expected. I suspect this has to do with the following line in my .zshrc:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
I can use (setenv "NVM_DIR" "~/.nvm") to set the env var, I'm at a loss per the second line.
including the line (setq exec-path (append exec-path '("~/.nvm/versions/node/v15.11.0/bin"))) does not solve my problem.