Skip to content
New issue

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

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

Already on GitHub? # to your account

Installation issue, url is blocked by our proxy. #2017

Open
WentingTan opened this issue Apr 6, 2022 · 2 comments
Open

Installation issue, url is blocked by our proxy. #2017

WentingTan opened this issue Apr 6, 2022 · 2 comments

Comments

@WentingTan
Copy link

WentingTan commented Apr 6, 2022

Issue or Feature

We are working on upgrading a new version of galata (v4.2.2) and "canvas" is one of the dependencies. We have an issue here: ‘node-canvas' install script tries to download the package from "{https://github.com/Automattic/node-canvas/releases/..."}, which is a url blocked by our company’s proxy (we literally block all third party urls). Canvas is available on our artifact, don't know why the install script doesn't pull the package from artifact. We are thinking to pre-install canvas manually in our docker container. However, we tried a few ways:

  • “npm install --build-from-source” (from source code)

and

  • “npm install package from tar.gz” (from tar.gz file)

both failed and it shows again it tries to download the pkg from the url (which is blocked by our proxy).

Error message:


node-pre-gyp ERR! install request to https://github.com/Automattic/node-canvas/releases/download/v2.9.1/canvas-v2.9.1-node-v72-linux-glibc-x64.tar.gz failed, reason: connect ECONNREFUSED 140.82.112.3:443 
node-pre-gyp WARN Pre-built binaries not installable for canvas@2.9.1 and node@12.13.0 (node-v72 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error request to https://github.com/Automattic/node-canvas/releases/download/v2.9.1/canvas-v2.9.1-node-v72-linux-glibc-x64.tar.gz failed, reason: connect ECONNREFUSED 140.82.112.3:443 

Is there a way to pre install canvas and avoid download from that git url?

@gulatirajat
Copy link

gulatirajat commented Apr 28, 2022

Similar scenario and similar issue at my end. The build errors out while trying to connect to and download from:
https://github.com/Automattic/node-canvas/releases/download/v2.9.1/canvas-v2.9.1-node-v83-linux-glibc-x64.tar.gz

I have tried providing proxy params to docker build using --build-args, however that does not works due to restrictions on our enterprise jenkins.

I have tried these steps as well, however that has not helped:
https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems

image

Container details:
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

node -v
v14.19.1
npm -v
6.14.16

Is there something I am missing in trying to follow the steps here:
https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems

@exige81
Copy link

exige81 commented Oct 19, 2024

If there is a mirror that you can access, you can tell node-pre-gyp to use --canvas_binary_host_mirror See #1771

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants