When running a visual studio code extension using canvas to generate image error logs, I get a problem when in the test enviroment stating that
node_modules/canvas.node was compiled against a different Node.js version using NODE_MODULE_VERSION 115. This version of Node.js requires NODE_MODULE_VERSION 116. Please try re-compiling or re-installing the module (for instance, using
npm rebuild
ornpm install
)..
This is strange because I’m using the latest version of mode, and running canvas outside of the visual studio code extension works.
I used yarn ,updated node to the latest version , rebuilt all the extensions, deleted node modules and then reinstalled, rebuilt using –rebuild-binary