netlify-plugin-gatsby
netlify-plugin-gatsby copied to clipboard
New/Custom Gatsby Cache Values Not Working
Thanks for reporting this bug!
If this is related to a typo or the documentation being unclear, please click on
the relevant page's Edit
button (pencil icon) and suggest a correction
instead.
Please search other issues to make sure this bug has not already been reported.
Then fill in the sections below.
Describe the bug
In my local build, I'm using the Gatsby API (v3.x) to cache data during the build process. (https://www.gatsbyjs.com/docs/build-caching/)
I see that after a successful build the data is added to the cache. When the subsequent build occurs, the logs say that Netlify/Gatsby found a previous cache. However, the value I set in the cache during the previous build is null.
Any ideas what might not be working or if this use case is supported?
Steps to reproduce
- Update Gatsby cache during the
createPage
andonPostBootstrap
lifecycle. - Confirm that build is successful
- Build again and debug the cache.
- Cache for value added in step #1 is empty/null.
Example:
- Type the following command: [...]
- etc.
Expected behavior
A clear and concise description of what you expected to happen.
Configuration
Using Gatsby 3.14.6 with the V2 Netlify plugins.
Environment
System: OS: Linux 5.4 Debian GNU/Linux 10 (buster) 10 (buster) CPU: (8) x64 Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz Shell: 5.0.3 - /bin/bash Binaries: Node: 14.18.1 - /usr/local/bin/node Yarn: 1.22.15 - /usr/bin/yarn npm: 6.14.15 - /usr/local/bin/npm Languages: Python: 2.7.16 - /usr/bin/python
Enter the following command in a terminal and copy/paste its output:
npx envinfo --system --binaries --browsers --npmPackages @netlify/plugin-gatsby
System: OS: Linux 5.4 Debian GNU/Linux 10 (buster) 10 (buster) CPU: (8) x64 Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz Memory: 1.43 GB / 15.63 GB Container: Yes Shell: 5.0.3 - /bin/bash Binaries: Node: 14.18.1 - /usr/local/bin/node Yarn: 1.22.15 - /usr/bin/yarn npm: 6.14.15 - /usr/local/bin/npm
Screenshots
If applicable, add screenshots to help explain your problem.
Can you submit a pull request?
Maybe.
Pull requests are welcome! If you would like to help us fix this bug, please check our contributions guidelines.
@stevepepple, is this still an issue for you?
@stevepepple, is this still an issue for you?
@nickytonline I'll test again this week and confirm. Which version should I try?
Just grab the latest version. 😎
Hi @stevepepple , just following up on my colleague's earlier message - did the latest version of the plugin resolve the issue for you?
Closing due to no response. If this continues to be an issue, please re-open.