-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Don't print Error 85911 for any parsing error #20507
Comments
Excellent point! What's happening here is
We should definitely improve this. The best way to do this is
We could definitely use help from anyone interested in working on this! If yes, please comment and I'm happy to pair on this 🙂 |
What exactly do you need assistance with? |
@sidharthachatterjee I can check this out.
be the default, so any error our code does not catch will come down to this. |
Hi! @MTyson Can you provide a minimal reproduction or provide clearer steps when this happens? @Danielshow Thanks for being so enthusiastic about Gatsby! 💜 |
Ok @LekoArts, that is nice |
@MTyson can you please provide the aforementioned reproduction? I tried a bunch of different errors in a component (e.g. |
I'm closing this for now. If you anyone can provide a reproduction, please let me know. Thanks! |
hey @LekoArts, I just noticed that 85911 occurs alone on TypeScript error stack
I suppose the workaround for me would be ensuring exact versions of An improvement in Gatsby file-parser could be using the line and column position of the problem in the 85911 error message. |
Okay, I added following lines to my yarn resolutions.
And then I encountered another error. Given following user code: type MyFragment = import("./__generated__/MyFragment").MyFragment;
export type { MyFragment };
Changing |
Hi, thanks for the comments! I sadly don't have time at the moment to dig into this but it would be helpful if you could open an issue with a clear reproduction of the error and some indication how it could be improved. Then we could tag it with "help wanted"/"hacktoberfest" or the like -- or feel free to take it up yourself. |
Summary
I'm surprised I can't find an issue on this already. Apologies if I just missed it.
I am impressed with much about Gatsby, but here's a big hindrance. Take a look at this error message:
"There was a problem parsing "foo/bar/file.js"; any GraphQL
fragments or queries in this file were not processed.
This may indicate a syntax error in the code, or it may be a file type
that Gatsby does not know how to parse."
How do I get a look at the parsing error? I don't know anything about what has gone wrong here. This is a component that isn't even supposed to have any graphql in it.
Basic example
In this case, any component definition that fails to parse seems to generate the error message.
Motivation
Something like:
Parse error occurred in thus-and-such section, at this line, and the parsing engine came up with this detailed error message
The text was updated successfully, but these errors were encountered: