-
Notifications
You must be signed in to change notification settings - Fork 979
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
GraphQL errors on new clone #875
Comments
Thanks for this report @ZBlocker655! We will investigate from there, what happens when you run I think I might have a suspicion that this is a remnant of an issue that was long opened #770. |
More context: the first time I did this I followed recommendations and deployed to Netlify first and verified that site and CMS were up and running fine. It was only when I cloned locally for local development that it fell over as I described above. And I believe at that time I did run |
I did not try to edit anything from the CMS on Netlify. I have since taken down the Netlify site so I can focus on getting it running locally. |
@intelcoder Howdy can you give the system stats for what you're running? Operating system, node version and package manager version? I'm trying to recreate this error but I can't seem to reproduce it on three different systems from a fresh install, using the same node versions and everything. Locally this error never occurs for me. Could someone provide their repository for me so I can investigate it from there? Maybe there was a missing update in between installs? |
Ran it again, with the following:
Results of
Results of
|
I'm getting the same error as @ZBlocker655 described above, when trying to develop locally either by @ZBlocker655 the warning messages from npm install I guess you can fix by passing a --legacy-peer-deps flag when runing a |
I have the same problem, did you solve it? |
Me also, was this ever solved? |
I solved the warning messages as @matheusdamiao indicated but I never did solve the underlying issue. I am no longer actively working on this and I decided to go with first a different Gatsby template and later a different static site generator altogether (not because of this.) |
Bumping |
I am struggling with the same problem. I tried the suggestion that regalius suggested, but I couldn't get it to work. Has anybody figured out a solution? I had it working for a while in December (I think maybe I had rolled back my Gatsby version? Or tried an older version of the starter?). I set up a fresh version today with the one-click set-up and that worked great, but when I created a local instance, it didn't work with develop or build. If anybody has any suggestions, I'd be grateful! Edit: From what I can tell, the images are appearing correctly in the blog but not anywhere else. The difference is that in the blog, the image fragment doesn't have any subfields--instead those subfields are being implemented inside of PreviewCompatibleImage using imageInfo. When I console log the frontmatter, it returns everything, including paths for images like: "image":"..\..\static\img\project_two.png". So, I wonder if things could be being done out of order? Whatever is supposed to be modifying the image field with subfields is happening after its image nodes are supposed to be created? Also, EventRoll on index-page seems to break the whole thing. Removing it still gives the string errors, but with it it won't even load the page. Says it can't find image data for an image that doesn't exist. But when I go into EventRoll and console.log(post.frontmatter.featuredimage), it returns "......\static\img\chemex.jpg". So it knows the path of the image--it just isn't recognizing it as an image. It uses PreviewCompatibleImage to try to show the image. Console logging the image in PreviewCompatibleImage gives "....\static\img\project_four.png" and the other three project images as well. So the string is making it all the way through. Should it be converted to an object here but isn't? Or is it that the path is wrong? The error for EventRoll remains that it can't read properties of undefined (reading 'gatsbyImageData') inside the PreviewCompatibleImage in EventRoll. So I think they aren't talking to each other right. The other images still have the problem of being considered strings, but they might be able to be fixed by using code from the blog-post templates, since that seems to work. Right now, I am thinking it is something to do with the prop or string functionality using .shape. I think the purpose of it is so that it works right with the netlify CMS stuff (which is why Netlify builds it correctly). When it is a string, the Netlify CMS must convert it correctly when it builds it, but when you build it locally, that Netlify CMS functionality isn't there, so it only sees it as a string. What do y'all think? |
I had the same issue and tried aforementioned troubleshooting steps to no avail. What did work for me was instead of using |
Bug report
What is the current behavior?
On a clean clone, ran
npm install
andgatsby develop
. Receiving multiple GraphQL errors of which the following is a sample:If the current behavior is a bug, please provide the steps to reproduce.
npm install
gatsby develop
What is the expected behavior?
Development site starts correctly and can be served from localhost.
Other relevant information:
Node.js version: 18.10.0
NPM/Yarn version: 8.19.2
Operating System: Windows 10
Additional tools: Gatsby CLI 4.24 (installed via choco)
The text was updated successfully, but these errors were encountered: