-
Notifications
You must be signed in to change notification settings - Fork 21
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: Cannot read properties of undefined (reading 'buildError') #139
Comments
Hmm, it looks like it 's because of the lack of |
i've been using it no problem for a week till today where i got the same error I also get the error with trivago's package. trivago/prettier-plugin-sort-imports#228 |
@a-somani there is probably a syntax error in your file. @vincerubinetti I'd be happy to review a PR if you'd like to try adding a nicer error message! |
this is my .prettierrc.json
i have not changed it since i used it last week when it was working. perhaps there was a vscode update or just the prettier vscode extension? |
This is not a problem in the plugin or prettier, it's a problem somewhere in the file that you are trying to format. |
do you know if theres an easier way to debug prettier in my file? im not sure whats causing |
Is it a TypeScript file? If so, you can try compiling it with |
I fixed it! I had named my react component the same as one of my imports. i resolved it by commenting out 1 line at a time till my prettier vscode plugin was no longer red. also found help with using yarn prettier **/*.tsx --check |
Closing because it's unfortunately unlikely i'll have the time to be able to dive in and figure out what to change and how. |
Your Environment
Describe the bug
See error log below.
To Reproduce
This is the file I'm trying to format. Still trying to narrow down what is tripping up the plugin.
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
I have tried removing the other plugins, and there is no effect. If I remove just this plugin, prettier is able to format the document.
Error log
Contribute to @ianvs/prettier-plugin-sort-imports
The text was updated successfully, but these errors were encountered: