Automattic / Automattic/node-canvas

No SVG support if compiled on GitHub Action Windows runners

Open
#2,333 2 comments 0 reactions 0 assignees View on GitHub
Installation help SVG
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

## Issue or Feature
- [X] If this is an issue with installation, I have read the [troubleshooting guide](https://github.com/Automattic/node-canvas/issues/1511).

If node-canvas is compiled on GitHub Action's Windows runner, it does not have SVG support.

## Steps to Reproduce

See here: https://github.com/UlyssesZh/test-canvas-svg/actions/runs/7404369817/job/20145774293

These are the commands that I use to set up build environment (as following the instructions [here](https://github.com/Automattic/node-canvas/wiki/Installation:-Windows)):
```powershell
New-Item -Name temp -ItemType Directory
Invoke-WebRequest https://ftp.gnome.org/pub/GNOME/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip -OutFile .\temp\gtk.zip
Expand-Archive .\temp\gtk.zip -DestinationPath C:\GTK
Invoke-WebRequest https://versaweb.dl.sourceforge.net/project/libjpeg-turbo/2.1.5.1/libjpeg-turbo-2.1.5.1-vc64.exe -OutFile .\temp\libjpeg-turbo.exe
.\temp\libjpeg-turbo.exe /S
```

Update: replace the download path of libjpeg-turbo with https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/2.1.5.1/libjpeg-turbo-2.1.5.1-vc64.exe. The old link became bad.

## Your Environment
* Version of node-canvas: 2.11.2
* Environment: Node.js 20.10.0 on Microsoft Windows Server 2022

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.