canvas
canvas copied to clipboard
Github Actions: Cannot find module '@napi-rs/canvas-linux-x64-gnu'
Hello,
I'm using @napi-rs/canvas (v0.1.44) with Node 20 in Jest tests and it works perfectly fine locally (MacOS 13.6 x64), but once I run the tests in Github Actions (ubuntu-latest) it fails with Cannot find module '@napi-rs/canvas-linux-x64-gnu' from 'node_modules/@napi-rs/canvas/js-binding.js'. I've seen some suggestions about removing package-lock.json and adding it to .gitignore, but it doesn't solve the issue in my case as well as it doesn't look like the best solution.
Any ideas on how to solve this?
See https://github.com/npm/cli/issues/4828