prettier / prettier-emacs

Minor mode to format JS code on file save
http://jlongster.com/A-Prettier-Formatter
372 stars 53 forks source link

Could not apply prettier #59

Open AlexanderArvidsson opened 5 years ago

AlexanderArvidsson commented 5 years ago

When trying to run prettier-js or when saving with prettier-js-mode, all I am getting is the following:

Wrote c:/Users/xxx/AppData/Local/Temp/prettiergc1tvy.jsx
Could not apply prettier

The error buffer only says prettier errors: followed by nothing. Is there any way to see what errors is causing this? The file it says it wrote is also not there, I assume because they are deleted right after?

I am on windows and have installed diff and verified that it works. Running prettier cli on the file returns the formatted code, the issue is just that it fails to apply the diff I guess. Using emacs version GNU Emacs 26.2 (build 1, x86_64-w64-mingw32) of 2019-04-13 Using Doom-emacs with default config and prettier-emacs added.

I'll set everything up the same on my arch laptop, it's probably just an issue with Windows.

t1anchen commented 1 month ago

I got similar situation and resolved by using a newer version of diff. hopefully it could help