-
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
StaticQueryHashes not generating #25909
Comments
@herecydev Strange that I couldn't reproduce this. Can you try clearing |
I've done a |
@herecydev So strange. Does it occur for all sites or only specifically the one you linked me to? Are you running |
Let me add some more verbose logs, push a release and then maybe you can post verbose logs for me with |
I first notice this on a site (which I can't publish) and then repro'd onto the gatsby starter we're looking at.
Tried both; same outcome. |
Hi folks, not sure if this is related or helps, but I can reproduce similar issue mentioned in #25723 git clone https://github.com/DanailMinchev/gatsby-starter-testing.git
cd gatsby-starter-testing
git checkout 4b65ddb3338b05be0d1d71d14710f591d98282ce
nvm use
npm ci
npm run build
npm run storybook Once Storybook is loaded navigate to http://localhost:6006/iframe.html?id=pages-index--basic and you will see following error:
|
Also, I tried https://github.com/herecydev/gatsby-static-query-bug, but it works fine for me: |
Did you check the console? It has loads of errors for me |
Yes, when loading the index page I can see some errors, they are 404 errors, for page data files of |
@DanailMinchev just skimming your repo. to make Storybook work nicely with Gatsby , you'll need to mock the data that is being passed into the page, take a look at this repo to see how you can do it. |
It seems to only happen on windows, fixing it as we speak. Sorry for the inconviences it may have caused |
So how did you fix it? I happens only on Window for me too |
@AleC77 PR is up, we will merge it tomorrow and publish a new version. I'll keep you posted. |
Fixed in |
Thank you! It works! |
Sorry, a bit offtopic:
Thank you @jonniebigodes , I had a look at your repo and used a similar approach (as well described in https://www.gatsbyjs.org/docs/testing-components-with-graphql/#testing-staticquery) to use "Pure Components". This means actually that testing visually with Storybook is a good approach only for dedicated pure components where we pass the graphql mock data as a data property for example. I was looking for more end to end visual testing where we test all of the pages, ideally not passing the mocked data, but using the generated pages instead and I switched to Cypress for "whole page" testing with https://github.com/palmerhq/cypress-image-snapshot (https://github.com/DanailMinchev/gatsby-starter-testing/blob/master/cypress/e2e/visual.test.js#L8), but if you have data which is changing on each build (for example I am wondering if you have other ideas for testing visually the whole pages which are not using mocked data and using mainly the final generated build to execute the visual tests? Thanks |
I had the same issue. I tried to deploy the Gatsby default starter, everything is fine locally, but the using-ssr page shows 404 when I have the starter deployed on netlify. https://bigwind100.netlify.app/ |
(Continuation from #25723)
Static Query Hashes are not being generated which is causing errors for the build gatsby site. @sidharthachatterjee gatsby clean hasn't resolved this.
The text was updated successfully, but these errors were encountered: