-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doesn't work with yarn due to CRLF line-ending #9
Comments
One option would be to use prettier, which by default always uses unix-style line endings https://prettier.io/docs/en/options.html#end-of-line Would you accept a PR adding prettier to the codebase? |
Sounds good! Thank you - I will accept a PR that adds prettier (and any fixes to the I wonder if it's because I used Windows to do my coding 😅 … I found this claim:
It's pretty bizarre that yarn can't handle something that's rather ubiquitous 🤔 I guess another approach is to re-save whatever files necessary replacing Would also be great if you happen to be able to check if it still works on Windows before you create the PR 👍 but I could check too - just let me know. |
I've had a closer look and the line-endings are actually fine (i.e. unix-style) in the source code so prettier won't help us here. I think what's happening is that you have
I think the best solution is to add a |
this ensures that the bin scripts in the published package are unix-compatible
opened a PR 🤞 |
@whyboris just wondering whether you had time to take a look at this - let me know if you have any questions about it or don't think it's the right solution. |
Sorry for the delay - busy weeks for me - I'm packing and getting ready to move to a new house 😅 |
cool, just checking |
Hi here 👋 First of all, thanks a lot for this nice tool! Liking the project a lot :) For anyone interested, this worked for me to bypass the issue. I've edited the line endings on the installed # Make sure `tcg` is installed globally.
# $ npm i -g typescript-call-graph
$ vim $(which tcg)
#!/usr/bin/env node
"use strict";
exports.__esModule = true;
var open = require("open");
...
# now in VIM command mode
# first set all line endings to the DOS format to avoid mixed endings
:e ++ff=dos
# change the line endings to a UNIX format
:set ++ff=unix
# save the file and quit
:wq If (Approach credits to this unix.stackexchange post 🙂 ) Hope this helps anyone. Cheers ✌️ |
I've been away from personal coding projects for most of the last year 😓 -- moving to a new state and fixing up the house has been time consuming 😅 I'll try to get back to coding in August (in a few weeks) - I really should have merged #10 earlier 🙇 |
@whyboris thanks for the response! :) No worries at all, I can imagine the feeling! ✌️ Of course take your time! :) |
steps to reproduce the issue:
yarn init -y
yarn add typescript-call-graph
yarn run tcg
env: node\r: No such file or directory
There's some discussion here yarnpkg/yarn#5480
The text was updated successfully, but these errors were encountered: