Closed lorisdev closed 4 years ago
Hi @lorisdev !
Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.
If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.
Thanks for using Gatsby! 💜
Hello @lorisdev - did you manage to go futher until early august ?
I'm facing a similar issue with my gatsby develop
command right now.
Error: ENOENT: no such file or directory, open 'path/to/my/project/.cache/json/_[some-random-page-slug].json'
Using gatsby build
, I'm building correctly a 4k pages website - but on local development I'm stuck with that error.
I'm suspecting maybe a long graphQL query or heavy image processing causing memory overheap or something.
Thanks in advance for any infos on this issue.
P.S: My specs
System:
OS: macOS 10.15.4
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.16.1 - /var/folders/xy/7y8smdfj46z_jw6lyn6wc7680000gn/T/yarn--1598891173631-0.17456750312657343/node
Yarn: 1.17.3 - /var/folders/xy/7y8smdfj46z_jw6lyn6wc7680000gn/T/yarn--1598891173631-0.17456750312657343/yarn
npm: 6.13.4 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 84.0.4147.135
Firefox: 79.0
Safari: 13.1
npmPackages:
gatsby: ^2.24.14 => 2.24.14
gatsby-image: ^2.4.13 => 2.4.14
gatsby-plugin-graphql-image: ^1.0.1 => 1.0.1
gatsby-plugin-intl: ^0.3.3 => 0.3.3
gatsby-plugin-jss-provider: ^1.0.10 => 1.0.10
gatsby-plugin-manifest: ^2.2.42 => 2.4.21
gatsby-plugin-polyfill-io: ^1.1.0 => 1.1.0
gatsby-plugin-react-helmet: ^3.2.1 => 3.3.10
gatsby-plugin-react-redux: ^1.0.10 => 1.0.10
gatsby-plugin-remote-images: ^2.1.0 => 2.2.0
gatsby-plugin-remove-serviceworker: ^1.0.0 => 1.0.0
gatsby-plugin-robots-txt: ^1.5.0 => 1.5.1
gatsby-plugin-sharp: ^2.4.5 => 2.6.23
gatsby-plugin-sitemap: ^2.2.27 => 2.4.11
gatsby-plugin-styled-components: ^3.1.19 => 3.3.10
gatsby-plugin-typegen: ^2.2.1 => 2.2.1
gatsby-plugin-use-query-params: ^1.0.1 => 1.0.1
gatsby-plugin-webpack-bundle-analyzer: ^1.0.5 => 1.0.5
gatsby-source-apiserver: ^2.1.4 => 2.1.7
gatsby-source-custom-api: ^2.1.4 => 2.1.4
gatsby-source-filesystem: ^2.1.48 => 2.3.23
gatsby-source-graphql: ^2.7.0 => 2.7.0
gatsby-transformer-sharp: ^2.3.14 => 2.5.11
@pascaloliv does this still occur in the latest gatsby version?
@wardpeet I can confirm that this occurs on the latest gatsby (2.24.53). The issue occurs on Mac, but not on windows. I get it immediately after the dev server starts (and the error kills the server).
My colleagues on Mac experience the same issue.
Can I get a reproduction? I can't seem to reproduce it locally on my mac.
I'm experiencing the same issue. Perhaps you can try reproducing the issue by cloning my repo?
Clone https://github.com/jeffreymeng/montavistamun
Run yarn install
and then gatsby develop
.
It should fail with the error.
However, if you run gatsby develop again, the error is gone.
(see #26859 for more details)
@jeffreymeng Thanks! I could reproduce it, will have a fix tomorrow!
Thanks for your effort guys ! I was too busy to come back with a reproduction recently. I'm glad your were able to have one. Can't wait to know where the bug came from. Have a great day all.
So the issue is that gatsby-plugin-typegen
writes files into the src director during query running.
While we have calculated which queries to run after staticQueries we get back into extractingQuery state and calculateDirtyQueries will not give us the correct information anymore so it looks like we have 0 pageQueries to run
Successfully published:
Description
I cannot use the
gatsby develop
command because it leaves an empty.cache/json
folder thus the dev server cannot serve the site.Unforunately the codebase is private but I was able identify on which gatsby version the issue occured. Gatsby 2.24.8 and 2.24.10 => OK develop works normally Gatsby 2.24.9 and 2.24.11 => develop works but output non blocking errors at the end of the script :
From Gatsby 2.24.12 to current version 2.24.34 (I didn't test every version in between) =>.cache/json stays empty during develop script. This is the last output before crash :
Steps to reproduce
Run
gatsby develop
Expected result
The develop script run smoothly and and development server is launched at the end of the process
Actual result
The develop script runs without apparent errors but then the dev server crashes because .cache/json is empty
Environment
Dependencies
Gatsby-Config