-
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
dev server crashes often with error: Cannot read property 'id' of undefined #4162
Comments
I tried this a few times and couldn’t reproduce **** Not that this is a fix.But it could help isolate the issue Have you tried changing the script to NPM run dev or Yarn start. That way if those work you can isolate the bug to the Gatsby CLI. Which you should uninstall and reinstall again anyways Before using again. Or my Next thought would bebecause it is happening when Webpack is bunbkeing the JS it lookings like. it mite be your Webpack layout if there is one in Gatsby node Also are you p |
I added a check to the code there to make sure that the node still exists before trying to access the id off it. Will merge and release it once Travis finishes. Lemme know if you have any more trouble after upgrading! |
cool, thanks for the quick fix, haven't had a problem since the update |
@KyleAMathews this fix took care of about 70% of the crashes, but it still does crash sometimes with the same error. Would you like me to open up a new issue or reopen this one? or can nothing else be done about it |
@deltaskelta hmmm bummer. We can keep the same issue going. Is it the exact same error though? Or is the stack trace different? |
Here is the trace, looks like it was coming from my EDIT: I have no idea what my
|
Ok, added another PR that follows up on some work I did yesterday + adds a fix for the above issue #4209 |
This crash happened very sporadically so I will close and assume it is fixed for now |
I'm getting a similar (intermittent) error which happens at the end of the build:
It's intermittent but I'm convinced it's related to the cache. Deleting the cache and rebuilding sometimes fixes it. The strange thing is that the site actually builds perfectly despite the error. Should I open a new issue? |
Can you try updating to the latest version of Gatsby? If that doesn't work, then open a new issue 👍 |
Description
I get constant failures of the dev server with the error
Cannot read property 'id' of undefined
. I believe this is caused in part because vim is deleting and adding a file probably after some plugin is making a buffer change and remaking the file...I am not sure exactly as I have not been able to exactly reproduce it in a starter yet.Environment
Gatsby version: 1.1.41
Node.js version: v9.5.0
Operating System: OSSierra 10.13.3
File contents (if changed):
gatsby-config.js
:package.json
:gatsby-node.js
:gatsby-browser.js
:gatsby-ssr.js
:Actual result
Expected behavior
Dev server should not crash
Steps to reproduce
I haven't been able to reliably reproduce yet, will add steps when I can narrow it down, posting for ideas based on the error output in the meantime
1.
2.
3.
...
The text was updated successfully, but these errors were encountered: