-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
[BUG] Error when attempting to create a project with Yarn on WSL #36
Comments
Thanks for letting me know. I don't have WSL installed on windows right now so I've only tested on Mac and Windows. Going to try reinstalling it to check it. It probably has CRLF in it if I made a release from Windows... maybe just doing another release from my Mac would fix it. I don't really know if there's a way to stop Windows from using CRLF I'm surprised it makes the script crash though, strange |
Interesting finding: I just tried running For now I'd advise using |
Thank you! I think git itself replaces line endings by CRLF, as I often get this message when committing:
You could ask git not to do the conversion, but I agree that yarn shouldn't be having this issue at all in the first place, so maybe it merits further investigation. |
Yes, it auto changes to LF before committing to avoid issues with Unix systems which is correct, what breaks is having the CRLF from Windows. But since I did the release from a Windows PC, it still had the windows line endings because the conversion would only happen for committing. there's a bug in yarn about this which seems to have never been fixed. npm apparently sneakily fixes line endings for you behind the scenes, while yarn doesn't. Seems a solution is to just add config files for the IDE to save files with LF instead of the default CRLF, so I'll try to set that up. |
Oh, I see what you mean now. For what's worth, other than this issue, Yarn has been working great out of the box. I was able to install dependencies and start the development server 👍 |
I've released a new version of create-narrat, seems like it fixes the issue with yarn. Also added more config files to make sure editors on windows use LF |
Describe the bug
Hi. On Linux (or at least WSL 2), attempting to run
yarn create narrat
results in this error:/usr/bin/env: ‘node\r’: No such file or directory
This is apparently because the
create-narrat
script has CRLF line endings. Changing them to just LF allows project creation to proceed as normal.To Reproduce
Steps to reproduce the behavior:
yarn create narrat
on WSL (and possibly other Linux environments)Screenshots
Thanks!
The text was updated successfully, but these errors were encountered: