You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's an official prebuilt NPM module that uses node-pre-gyp to download preassembled binaries so you avoid any node-gyp errors. See that repository's readme for a list of supported platforms and Node.js versions.
Install
Canvas 2.x uses prebuilds by default when you run npm install canvas or yarn add canvas. 🎉
For earlier versions, run npm install canvas-prebuilt and replace require('canvas') with require('canvas-prebuilt') in your code. You may also need to replace canvas with canvas-prebuilt in your package.json dependencies.