Skip to content
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

TypeError: prettierApi.getFileInfo.sync is not a function #16097

Closed
caozuba opened this issue Feb 19, 2024 Discussed in #16096 · 0 comments
Closed

TypeError: prettierApi.getFileInfo.sync is not a function #16097

caozuba opened this issue Feb 19, 2024 Discussed in #16096 · 0 comments
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Comments

@caozuba
Copy link

caozuba commented Feb 19, 2024

Discussed in #16096

Originally posted by caozuba February 19, 2024
Hi, I'm trying to set up prettier with webstorm.
I have followed instruction here: https://prettier.io/docs/en/webstorm
but when I try to run comman Format with prettier, I got this error.
Does anyone got this error?

TypeError: prettierApi.getFileInfo.sync is not a function
at PrettierPlugin.handleReformatCommand (/Applications/WebStorm.app/Contents/plugins/prettierJS/prettierLanguageService/prettier-plugin.js:28:52)
at PrettierPlugin.onMessage (/Applications/WebStorm.app/Contents/plugins/prettierJS/prettierLanguageService/prettier-plugin.js:11:33)
at Interface. (/Applications/WebStorm.app/Contents/plugins/JavaScriptLanguage/jsLanguageServicesImpl/js-language-service.js:105:39)
at Interface.emit (node:events:394:28)
at Interface._onLine (node:readline:487:10)
at Interface._normalWrite (node:readline:661:12)
at Socket.ondata (node:readline:269:10)
at Socket.emit (node:events:394:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:285:11)

@caozuba caozuba closed this as completed Feb 19, 2024
@github-actions github-actions bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label May 20, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

No branches or pull requests

1 participant