question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UI_REACT: Cannot build on windows host due to prettier EOL error

See original GitHub issue

Hello, unfortunately I’m working in a windows environment. This means that, by default, git checks out all files with CRLF endings and commit with simple LF endings. Apparently, prettier by default expect the default line ending to be LF. But to me what they propose seems too much since, as I said, the default git config for windows transforms CRLF to LF when committing. If you agree, this can be easily fixed by adding:

"endOfLine":"auto"

In .prettierc

PS: I can open a PR if you agree on the fix.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
riccardo-forinacommented, May 11, 2020

Go with the .prettierrc 😃

1reaction
riccardo-forinacommented, May 11, 2020

Thanks for reporting this. I’d rather fix it as suggested by them, by hinting git to use LF by default:

Add * text=auto eol=lf to the repo's .gitattributes file. You may need to ask Windows users to re-clone your repo after this change to ensure git has not converted LF to CRLF on checkout.

You’ll have to reclone the repo then. Does that work for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixing the linebreak-style eslint error for Windows #171 - GitHub
On Windows, with the current eslint setup, you get this error: Expected linebreaks to be 'LF' but found 'CRLF'. The eslint site says...
Read more >
My create-react-app is failing to compile due to ESLint error
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder. 2. Delete node_modules in your project folder. 3.
Read more >
Build a fully production ready machine learning app with ...
Docker Guide - Build a fully production ready machine learning app with React, Django, and PostgreSQL on Docker ...
Read more >
Release notes for Windows - Zoom Support
The process of joining a meeting is enhanced to combine the Please wait for the host to start this meeting window and the...
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/19 06 ...
Bug :128538 - "sys-apps/coreutils: /bin/hostname should be installed from coreutils not sys-apps/net-tools" status:UNCONFIRMED resolution: severity:enhancement ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found