Fork me on GitHub

Hi all. I'm getting an error: error: could not start nREPL server. COMSPEC not set.


Any idea what could cause this?


@edmund691 From a quick search, this looks like an issue specific to Windows operating system. Seems windows can't find your CMD.exe binary. Try searching for this error in a search engine and try some of the suggestions. You could also try #clj-on-windows channel, but this seems specific to your windows config.


Also try running a command window to se if that works


@jr0cket thanks for your response. Commands are working. I can start the repl from the windows command using lein. Its been working but for some reason I just started getting this error. Tried re-installing both emacs and spacemacs to no avail. Not getting much useful hints on google. The error isn't giving me much to work with.


Is cider-connect-clj working from Spacemacs? The only thing I can think of is something missing from the path information that Emacs picks up and is unable to call out to the command line (the error seems specific to the cmd.exe location). If you are using Spacemacs develop branch, then SPC f e e will open the spacemacs.env file that is automatically populated with environment variables from the operating system. Environment variables can be added to the spacemacs.env file. If you are using Spacemacs master branch, then use SPC SPC getenv to see the environment variables set. Fix the environment variables in the operating system and then restart the operating system. I dont use windows, so cant help you with the specifics of the environment variable needed (I am sure an internet search will tell you). If using Spacemacs master you can also try switching to develop (although if its a path issue in the operating system then that probably wont fix it, but develop is the recommeded version of Spacemacs to use)


@jr0cket thanks for pointing me in the right direction. Needed the COMSPEC env set to the windows cmd path. No idea how it was working all along without it. Thanks a million.

👍 3