-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Installation: Prebuilt
Zach Bjornson edited this page Jul 7, 2018
·
1 revision
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.
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.