I use cygwin on windows 8.1 to have an Unix shell. But I cannot run commands such as npm from it.
What should I do to do it? Add some kind of env var to cygwin? Why
sed -i 's/\r//' "$(type -p npm)"
Convert line endings
Also despite the comment, this will not hurt execution with cmd.exe
cmd.exe
$ printf '@echo hello\n@echo world\n@echo doge\n' > foo.bat $ cmd /c foo.bat hello world doge