edvinh / node-sloc

A small tool written in node for counting source lines of code.
10 stars 3 forks source link

"No such file or directory" no matter what directory is selected #15

Open matthew-dean opened 2 years ago

matthew-dean commented 2 years ago

No matter what directory, even if I try something as simple as node-sloc ., I get this error:

env: node\r: No such file or directory

Is it possibly related to this? https://stackoverflow.com/questions/30344858/node-script-executable-not-working-on-mac-env-node-r-no-such-file-or-directo

edvinh commented 2 years ago

Hi, thanks for creating this issue. It does indeed seem to be related to that -- I just reproduced the issue on macOS. The CLI works just fine on macOS if installed with npm^5.4.0, but not with yarn. So my suggestion would be to install it with npm for now until a fix has been published. Why the issue came up in the first place is beyond me, git is set up on my local (Windows) machine to commit LF line endings. Should be a trivial fix though, just need to normalize all line endings. I'll publish a new version as soon as possible.