node.jsubuntuwindows-subsystem-for-linuxnpx

Running npx in WSL Ubuntu gives a CMD.EXE and UNC error


I am running make in a directory which runs npx tailwindcss -i ./static/src/input.css -o ./static/dist/css/output.css but unfortunately I get the error as below

jbob@macbook:~/temmplate/src$ make
npx tailwindcss -i ./static/src/input.css -o ./static/dist/css/output.css
'\\wsl.localhost\Ubuntu\home\jbob\template\src'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
Specified input file ./static/src/input.css does not exist.
make: *** [Makefile:2: all] Error 9

Any suggestions?

Thanks

I have looked at other questions of a similar ilk but no luck


Solution

  • I had node and therefore npx installed on the host Windows system and it was trying to reference that instead of the copy installed on Ubuntu

    Uninstalled it on Windows and it started working