netlify / netlify-plugin-gatsby

A build plugin to integrate Gatsby seamlessly with Netlify

Home Page:https://www.npmjs.com/package/@netlify/plugin-gatsby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New/Custom Gatsby Cache Values Not Working

stevepepple opened this issue · comments

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

  1. Update Gatsby cache during the createPage and onPostBootstrap lifecycle.
  2. Confirm that build is successful
  3. Build again and debug the cache.
  4. Cache for value added in step #1 is empty/null.

Example:

  1. Type the following command: [...]
  2. 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.