Nixinova / LinguistJS

Analyse and list all languages used in a folder. Implementation of and powered by GitHub's Linguist.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI error due to CRLF line endings

kachkaev opened this issue Β· comments

πŸ‘‹ @Nixinova!

I’m so glad that you’ve ported Linguist – doing all this gem install cmake pkg-config in 2021 does not make any sense 😁

I tried linguist-js as an imported npm dependency and it worked for me well! Great work! πŸ‘

Just out of curiosity, I also tried yarn linguist after yarn install linguist-cli and got this error message:

yarn linguist                   06:16:26 pm
yarn run v1.22.11
$ /path/to/my/project/node_modules/.bin/linguist
env: node\r: No such file or directory
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Looks like the issue is with CRLF instead of LF in your bin file, which should be easy to fix. I did this locally in node_modules/linguist-js/bin/index.js and yarn linguist worked:

yarn linguist                   06:24:00 pm
yarn run v1.22.11
$ /path/to/my/project/node_modules/.bin/linguist
Welcome to linguist-js, the JavaScript port of GitHub's language analyzer.
Type 'linguist --help' for a list of commands.
✨  Done in 0.62s.

You can read on CRLF/LF here: https://prettier.io/docs/en/options.html#end-of-line

Once again, great project! I hope it’ll get all the GitHub stars it deserves! πŸ‘

I'll look into this, and thanks for the support!

Try it in 2.0.2, should be fixed

Yep, it is fixed! πŸŽ‰ Thank you!