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
You will need the cairo library which is bundled in GTK. Download the GTK 2 bundle for Win32 or Win64. Unzip the contents in C:\GTK.
Notes:
Both GTK and Node.js need either be 64bit or 32bit to compile successfully.
Download GTK 2, not GTK 3, which is missing the required libpng. If you get linker errors you've most likely picked the wrong bundle.
If you use a different location than C:\GTK, add a GTK_Root argument to npm install or node-gyp rebuild. For example: node-gyp rebuild --GTK_Root=C:\somewhere\GTK.
3. Installing libjpeg-turbo (optional, for JPEG support; node-canvas 2.0 and later)
Download the latest libjpeg-turbo SDK for Visual C++ (currently libjpeg-turbo-2.0.0-vc.exe or libjpeg-turbo-2.0.0-vc64.exe) and install to its default location (C:\libjpeg-turbo if 32bit or C:\libjpeg-turbo64 if 64bit).
Notes:
Both libjpeg-turbo and Node.js need either be 64bit or 32bit to compile successfully.
If you use a different location, add a jpeg_root argument to npm install or node-gyp rebuild. For example: node-gyp rebuild --jpeg_root=C:\somewhere\libjpeg-turbo.
4. Installing node-canvas
After all dependencies are setup, npm install canvas or yarn add canvas.
Install with Chocolatey
⚠️Be aware that according to known Chocolatey issues it is better to use instructions for manual install, provided above. If you figure out a way to fix the chocolatey instructions, feel free to edit this wiki.
All the dependencies can be installed with Chocolatey, the package manager for Windows.