Hello, I’m trying to set up my first CircleCI builds, after a first try I got the build working (it’s a Node app using the Gatsby static site generator), but upon rebuild I every time have the error below:
Error: The module '/home/circleci/repo/node_modules/sharp/build/Release/sharp. node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 51. This version of Node.js requires
NODE_MODULE_VERSION 59. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
If I “rebuild without cache”, the error is fixed. But of course I can’t do that every time.
Sharp is an image manipulation library which is a dependency of Gatsby and it needs to compile some native code. However I don’t understand the error because the previous build was made in the exact same conditions on CircleCI. Would anyone know how to debug this? Thanks very much.
