Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install latest node-canvas from custom mirror #1771

Open
ryanboswell opened this issue Mar 26, 2021 · 3 comments
Open

How to install latest node-canvas from custom mirror #1771

ryanboswell opened this issue Mar 26, 2021 · 3 comments

Comments

@ryanboswell
Copy link

I'm working on a project that uses node-canvas at work, but our build system is closed off from the open internet, so we're required to mirror binaries like node-canvas internally. Lots of other packages support providing an environment variable to point to an alternative mirror host or path and I'm hoping that node-canvas does too, or can.

I found another issue from a few years ago, that seems mostly targeted to the now deprecated node-canvas-prebuilt version. The tldr; being that an env variable named canvas_binary_host_mirror should have the mirror path in it and allow downloading from there, but from my testing that isn't recognized at all.

None of the installation instructions I can find shed any light on whether this is still supported in some form, so I was hoping it is and is just not documented yet. Or there's a process that can get support for this added.

Your Environment

  • Version of node-canvas (output of npm list canvas or yarn list canvas): 2.7.0
  • Environment (e.g. node 4.2.0 on Mac OS X 10.8): Node 14.16.0 on Ubuntu
@LinusU
Copy link
Collaborator

LinusU commented Mar 27, 2021

This might be able to help you:

https://github.com/mapbox/node-pre-gyp#download-binary-files-from-a-mirror

If you manage to get it working I would appreciate a PR that adds a note about how to do it to the readme ☺️

p.s. sorry for the short answer, I don't have time to test this myself at the moment

@ryanboswell
Copy link
Author

Looks like those steps do work, I'll find some time a little later to submit a tweak to the docs to make that easier to find.

@th0car
Copy link

th0car commented Apr 13, 2021

Could this in any way also be applicable to access the current releases in https://github.com/Automattic/node-canvas/releases from a mirror or local artifactory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants