Compiling build :dev to "resources/public/js/compiled/out/index.js" from ["src"]...
Failed to compile build :dev from ["src"] in 38.449 seconds.
---- Exception ----
clojure.lang.ExceptionInfo : :build-cmd :none failed
java.io.IOException : Cannot run program "npx": CreateProcess error=2, The system cannot find the file specified
java.io.IOException : CreateProcess error=2, The system cannot find the file specified
---- Exception Stack trace....
Might be a bug in figwheel, not your fault. npx is actually npx.cmd on Windows so it won’t find it under npx. You might have more success when you run everything in WSL.
---- Exception ----
clojure.lang.ExceptionInfo : :build-cmd :none failed
java.io.IOException : Cannot run program "npx": CreateProcess error=2, The system cannot find the file specified
java.io.IOException : CreateProcess error=2, The system cannot find the file specified
----
I’m using WSL and switched to WSL2. But the filesystem performance of WSL2 is so abysmal that I had to converted back to WSL. The problem is known. The github issue is a novel. I cannot recommend WSL2 for file I/O intense apps - eg. git projects with many files.
You can develop on Windows, like Clojure and ClojureScript both run. The issue is there isn’t as much tooling being tested or thought out for Windows. This opens up the door for Windows users in the community to help out with testing tooling on Windows and contributing patches if there are any bugs.
Sure, it has some rough edges. Not sure what you were doing, but it works nicely when following this rule:
With WSL2 (at the moment) you should be working on native linux filesystem (e.g in /home/$LINUX_USER not in /mnt/c/Users/$WIN_USER - which is a slow plan9 mount) and when you rarely need to access the files from Windows side, you go through \\wsl$ network drive visible in Windows. So for example doing git status must be done on linux side via terminal (or via special support in VS code), running git status on windows side e.g. from \\wsl$\home\$LINUX_USER is a bad idea.