-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
formatFiles in generator fails with TypeError (received Promise instead of Buffer like) #18308
Comments
Running into this issue too, when migrating from 15.9.4 to 16.6.0. I suspected this to be a result of our repo using Prettier v3, so I downgraded to 2.8.8 and ran all migrations again (I could revert all of them easily because we use I can confirm this did solve the issue for us, using Prettier v2. |
Hello, I'm having also this issue with Nx 16.6.0 and prettier v3 on Windows. |
Yes, I can also confirm that the problem is related to Prettier v3. With Prettier 2.8.8 everything works correctly. Nx: 16.6.0 |
@schmkr Thank you for spotting the cause of the issue! Exactly the same story for me: Rolling back prettier to 2.8.8 allowed migrations to run with no issues. |
Correct me if I am wrong but NX usually installs its correct peers by itself with |
I am not totally sure, but could be that this issue is related to #19207 |
I was having a similar issue when upgrading to prettier v3 on the qwik-ui cli tests:
Using |
This was fixed with: #19207 |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
When using
formatFiles
in a generator, callingformatFiles(tree)
as usual, it starts giving this error:Up until last update, it worked flawlessly.
Generators continues, but files are not formatted.
Expected Behavior
Files should be formatted without error.
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
Operating System
Additional Information
Used to work.
Did not have the time to track the issue in the code for now, just wanted to post and let people +1 if they see the issue too.
The text was updated successfully, but these errors were encountered: