-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Wrong line endings after installation #5480
Comments
wow... so npm actually changes the line endings for files listed in package.json "bins". 😞 The
It's unfortunate that npm edits packages and tries to "correct" them instead of encouraging package owners to publish valid packages. But I guess the precedent has been set. Thanks for reporting this. I'll flag this as a compatibility bug. If you want to work up a PR, we would appreciate it. edit: I also checked this on Windows and it looks like npm does not change the line endings for that file. So npm must be converting it to the "normal" line endings for the current OS. |
So behaviour should be same with npm? |
I would expect the behavior to be the same in npm and yarn. In this case it makes sense for yarn to change to match npm. |
I confirm this bug with |
as workaround it worked for me |
Same problem (Ubuntu 18.04, yarn 1.9.4). |
Just encountered this with |
The installed executable was failing on Mac with the following error: `env: node\r: No such file or directory` Solution as detailed here is to release from a Unix-based OS: yarnpkg/yarn#5480
I fixed it with |
The installed executable was failing on Mac with the following error: `env: node\r: No such file or directory` Solution as detailed here is to release from a Unix-based OS: yarnpkg/yarn#5480
- 🐛 Publish package with LF line endings for yarn (see [#5480](yarnpkg/yarn#5480)).
I'm guessing the long-term fix for this is to move away from Windows for development. In the meanwhile we can make sure to add the It can be something like this:
Also can be set in GIT > |
@rally25rs I'm trying to write a pr to fix this issue~ |
Note that yarn v1 is no longer under development, other than critical and security fixes. A PR may sit open indefinitely. Everyone is encouraged to look into migrating to yarn v2
Sent from TypeApp
On Oct 14, 2021, 10:49 AM, at 10:49 AM, vagusX ***@***.***> wrote:
***@***.*** I'm trying to write a pr to fix this issue~
…
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#5480 (comment)
|
@rally25rs got it✔️ |
Follow the suggestions in yarnpkg/yarn#5480 - establish .editorconfig setting to ensure LF is used by editor - establish .gitattributes setting to ensure LF is used upon checkout Convert existing files to LF via dos2unix.
I had this bug today with |
What is the current behavior?
After installing npm-scripts-info, all files of this package have CRLF line endings and it cause error:
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Expected to have no errors while running script. If install package through npm, it works correct.
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: