Node version caching

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

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

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

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:

1 Like

let us know what you end up doing and what works, please! :+1:

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

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?