samizdatco / skia-canvas

A GPU-accelerated 2D graphics environment for Node.js
MIT License
1.7k stars 66 forks source link

📢 Installation fails for pre-1.0.2 versions: Alternative installation instructions #160

Open samizdatco opened 1 month ago

samizdatco commented 1 month ago

You may have noticed that your attempts to npm install versions of skia-canvas ≤1.0.1 have started failing and reporting 403 Forbidden errors when downloading the library from skia-canvas.s3.us-east-1.amazonaws.com. Unfortunately I was forced to remove the libraries from S3 due to extreme levels of traffic (and unaffordable bandwidth costs) that seem to be due to misbehaving web scrapers. New releases, beginning with 1.0.2, are now hosted using GitHub Releases which should prevent this from happening again in the future.

If you're simply looking for a solution for getting your preferred version of skia-canvas installed, you have two options:

Upgrade to the newest version of the library

The simplest (and most future-proof) approach is to upgrade to the newest release. This version is available through the npm catalog and can be installed/upgraded within your project by typing:

npm install skia-canvas@latest

Install an older version archived on GitHub

Versions 0.9.24–1.0.1 are still available and can be installed from the archives hosted in the various Release pages of this repository. Each release has a Deprecation Warning which contains a toggleable list of Installation commands — click the triangle to view the list.

For example, version 1.0.1 looks like:

image

Scroll to the version you'd like to install and then look through the list for the platform you're running on—make sure you select the correct CPU architecture and, in the case of Linux, C library for your system. (If you're running Alpine or Gentoo linux, be sure to use the musl version).

Once you find the right entry, click its 'two squares' icon to copy the text snippet then run the corresponding npm install … command in your project directory to install skia-canvas from the GitHub url.

The releases that can be installed this way include:

pv93 commented 1 month ago

Hi! It looks like linux arm64 builds with glibc are missing from the github downloads page for 1.0.0: https://github.com/samizdatco/skia-canvas/releases/tag/v1.0.0

samizdatco commented 1 month ago

Thanks for catching that! The linux arm64/glibc download for 1.0.0 should now be available.