Emacs: help setting Cider with shadow-cljs in Emacs with C-c M-j

I’m trying to run C-c M-j and connect to shadow-cljs repl. I get this error: user-error: The npx shadow-cljs executable isn’t on your ‘exec-path’.

I installed shadow-cljs globally. Why is it invoking it with npx?? How do I change this? I’m very new to cider and clojurescript. Not sure which variable needs tweaking.



I have this exact same problem cider 2020-04-29 | Slack Archive

The thing is that I’ve adding (exec-path-from-shell-copy-env “PATH”) to my init.el and still have the same issue.

1 Like

does it work when you run npx shadow-cljs or shadow-cljs directly via command line?

Yes, I am able to do so. I have inspected exec-path and this is what I get back:

("/home/wario/.guix-profile/bin/" "/home/wario/.guix-profile/sbin/" "/home/wario/.config/guix/current/bin/" "/home/wario/.guix-profile/bin/" "/home/wario/.guix-profile/sbin/" "/home/wario/.local/bin/" "/home/wario/.local/bin/" "/home/wario/bin/" "/home/wario/.guix-profile/bin/" "/home/wario/.guix-profile/sbin/" "/home/wario/.guix-profile/bin/" "/home/wario/.guix-profile/sbin/" "/home/wario/.config/guix/current/bin/" "/home/wario/.local/bin/" "/usr/local/sbin/" "/usr/local/bin/" "/usr/sbin/" "/usr/bin/" "/sbin/" "/bin/" "/usr/games/" "/usr/local/games/" "/snap/bin/" "/gnu/store/62xfj3bfvjjzr8wd46q788hp1nbq5a0z-emacs-27.1/libexec/emacs/27.1/x86_64-pc-linux-gnu/") 

I do not see any NVM stuff in there. BTW, I did add the nvm executables with (add-to-list 'exec-path “my/node/exec/path”) and it also did not work. How do I add the NVM executable path to exec-path??

My executables are now in path but I can’t jack-in to shadow-cljs I get this error now:

error in process sentinel: Could not start nREPL server: /usr/bin/env: ‘node’: No such file or directory