fnm icon indicating copy to clipboard operation
fnm copied to clipboard

Use with apps that don't load ~/.zshrc (e.g. Android Studio)

Open uloco opened this issue 3 years ago • 5 comments

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.

uloco avatar Jul 01 '21 16:07 uloco

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?

Schniz avatar Jul 01 '21 16:07 Schniz

Sounds good to me. But what do I know 😅

uloco avatar Jul 02 '21 00:07 uloco

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.

tbro avatar Aug 17 '21 19:08 tbro

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.

taeric avatar Mar 09 '23 20:03 taeric