-
-
Notifications
You must be signed in to change notification settings - Fork 105
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 'startLine') #685
Comments
Can you provide the Java file that you experience this error with? |
I probably cannot share it. It's from a private repository for work. I spent some time trying to figure out what is causing the error on my own, but this file is 4.5k lines so going through it by hand to look at every comment takes some time. Can you tell anything from the prettier output? If I cannot share the file, can you give me guidance on how to determine what is causing the problem? |
I confirmed I cannot share the file. How can I tell where in the file the exception occurred? |
@jtkiesel I created a launch in VS Code for I found the line in the file that is being formatted from the breakpoint, too. The line has a comment at the end. I moved the comment to its own line and the problem went away. I made a quick example. When I remove public class Example {
public static void main(String[] args) {
Foo bar
= !baz //comment1
|| bat //comment2
? null //comment3
: bam //comment4
;
}
} |
I'm getting a type error formatting 1 particular file. Any ideas?
The text was updated successfully, but these errors were encountered: