# Node version caching

**URL:** <https://answers.netlify.com/t/node-version-caching/10014>\
**Category:** Support\
**Tags:** gatsby, deployment\
**Created:** [March 4, 2020, 7:24pm UTC](https://answers.netlify.com/t/node-version-caching/10014 "2020-03-04T19:24:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![immbudden](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/immbudden/32/7543_2.png) [@immbudden](https://answers.netlify.com/u/immbudden)\
**Post date:** [March 4, 2020, 7:24pm UTC](https://answers.netlify.com/t/node-version-caching/10014/1 "2020-03-04T19:24:57Z")

</div>

Hi guys, just noticed that netlify is caching my node version from previous deployments. I am wondering what is the easiest way to force it to update?

I would rather not delete the whole cache as it is quite big but it may be the only solution.

The reason I need to update is because node 8.17.0 isn’t being supported any more by gatsby and I don’t want issues with deployments going forward.

Appreciate the help!

Thanks,  
Michael

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [March 4, 2020, 7:43pm UTC](https://answers.netlify.com/t/node-version-caching/10014/2 "2020-03-04T19:43:12Z")

</div>

hi Michael, if you try deploying and clearing the cache, i do believe it should update.

 ![retry-deploy-and-also-clear-build-cache](https://global.discourse-cdn.com/netlify/original/2X/3/3725c4fa176dfd067fcafc6ad2987216d8c84c62.png)

---

<div class="post-metadata">

**Author:** ![immbudden](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/immbudden/32/7543_2.png) [@immbudden](https://answers.netlify.com/u/immbudden)\
**Post date:** [March 4, 2020, 8:06pm UTC](https://answers.netlify.com/t/node-version-caching/10014/3 "2020-03-04T20:06:15Z")

</div>

Thanks Perry, gonna do that. Out of interest, there any other way to do it?

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [March 4, 2020, 8:07pm UTC](https://answers.netlify.com/t/node-version-caching/10014/4 "2020-03-04T20:07:49Z")

</div>

I believe that if you set the node version manually, it should also update? Not 100% sure on that but to the best of my knowledge that should work.

more in our docs:

> **[Manage build dependencies](https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-and-javascript)**
>
> Specify dependencies for your project so that our platform can install required languages and software before running a build.

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [March 4, 2020, 9:26pm UTC](https://answers.netlify.com/t/node-version-caching/10014/5 "2020-03-04T21:26:04Z")

</div>

let us know what you end up doing and what works, please! 👍

---

<div class="post-metadata">

**Author:** ![immbudden](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/immbudden/32/7543_2.png) [@immbudden](https://answers.netlify.com/u/immbudden)\
**Post date:** [March 4, 2020, 11:00pm UTC](https://answers.netlify.com/t/node-version-caching/10014/6 "2020-03-04T23:00:59Z")

</div>

So I successfully managed to force an update of node on the server by running `node -v > .nvmrc`, however doing so caused an issue with `sharp` module for some reason.

Currently still trying to debug that and find out exactly why, error is:

`The module '/opt/build/repo/node_modules/sharp/build/Release/sharp.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 57. This version of Node.js requires NODE_MODULE_VERSION 64. Please try re-compiling or re-installing`

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [March 7, 2020, 1:49am UTC](https://answers.netlify.com/t/node-version-caching/10014/7 "2020-03-07T01:49:09Z")

</div>

Well, yes. You’ve changed node version, and sharp is very node version dependent. You’d have to clear the cache one more time (on each branch) to prevent that clash. If you still get it with a cleared cache, seems sharp is somehow getting built using different node by your build pipeline - if you see that, is it a normal dependency in your `yarn.lock`?
