fnm
fnm copied to clipboard
Use with apps that don't load ~/.zshrc (e.g. Android Studio)
Android studio does not load the terminal and if your node is only installed via fnm it is not usable for the application. Is there any way we can overcome this, by adding something to path? I think the problem is caused by the multishell feature, but not sure exactly.
I was thinking about adding an optional node
and npm
wrappers that forward everything to fnm exec
for these kind of situations, that can be installed with:
$ fnm install-binstubs sh --path /usr/local/bin
# or
C:\> fnm install-binstubs wincmd --path ...
We already have the foundations for that. What do you think?
Sounds good to me. But what do I know 😅
If I understand the issue correctly, this also affects systemd user services (running emacs as a server, for example). A dynamic path rules out the conventional ways of passing environment to systemd. We would have to import variables to systemd after fnm env
(presumably in .zshrc
or .bashrc
) then restart any user services which depend on them.
Would I be correct that this is the same problem I would see trying to use it from emacs? It will work from "shell" instances in emacs, but will not work in "eshell", and I am not clear how to get eglot to know how to use an fnm controlled typescript.
Happy to try anything in particular to get this running.