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

npm i canvas@2.8.0 failing with 403 response status #1902

Closed
RutujaChaudhari opened this issue Sep 21, 2021 · 11 comments
Closed

npm i canvas@2.8.0 failing with 403 response status #1902

RutujaChaudhari opened this issue Sep 21, 2021 · 11 comments

Comments

@RutujaChaudhari
Copy link

Issue or Feature

  • Issue with canvas@2.8.0 installation. Getting 403).

node-pre-gyp ERR! install response status 403 Forbidden on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-darwin-unknown-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for canvas@2.8.0 and node@14.16.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 403 Forbidden on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-darwin-unknown-x64.tar.gz
/bin/sh: pkg-config: command not found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error

Steps to Reproduce

npm i canvas@2.8.0

Your Environment

  • Environment : node v14.16.0 ,Mac OS X 10.15.7
@trinhenouvo
Copy link

I've got the same issue recently!

@danghy
Copy link

danghy commented Sep 21, 2021

Me too

node-pre-gyp ERR! install response status 403 Forbidden on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-linux-glibc-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not installable for canvas@2.8.0 and node@14.17.6 (node-v83 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error response status 403 Forbidden on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-linux-glibc-x64.tar.gz 
Package pangocairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `pangocairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pangocairo' found
gyp: Call to 'pkg-config pangocairo --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 4.18.0-193.19.1.el8_2.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/app/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/usr/app/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /usr/app/node_modules/canvas
gyp ERR! node -v v14.17.6
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/app/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/usr/app/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/app/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 4.18.0-193.19.1.el8_2.x86_64
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/app/node_modules/canvas
node-pre-gyp ERR! node -v v14.17.6
node-pre-gyp ERR! node-pre-gyp -v v1.0.5
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/app/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/usr/app/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.3.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN relish@3.0.0 requires a peer of hapi@>= 17 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN Childcare-Listing@1.0.1 No repository field.
npm WARN Childcare-Listing@1.0.1 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas@2.8.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the canvas@2.8.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-21T07_48_02_167Z-debug.log

@SatoshiKawabata
Copy link

I could work around it by canvas@2.6.1 for now.

@UmangThapliyal
Copy link

I am using resemble.js and it is failing due to this do we have some update on this

@kryops
Copy link

kryops commented Sep 21, 2021

I traced this problem to the update of node-fetch@2.6.3. Pinning it at node-fetch@2.6.2 through a yarn resolution seems to fix the issue:

"resolutions": {
  "**/@mapbox/node-pre-gyp/node-fetch": "2.6.2"
},

@kryops
Copy link

kryops commented Sep 21, 2021

Further analysis: Root cause seems to be node-fetch/node-fetch#1300

The PR node-fetch/node-fetch#1301 seems to fix this issue.

@AnastasiaSokolova
Copy link

Have the same issue... When this PR is expected to be merged?

@Neozxc
Copy link

Neozxc commented Sep 21, 2021

node-fetch@2.6.3 has problems.
Just npm i node-fetch@2.6.2 and npm i canvas

@melvinchng
Copy link

Have the same issue... When this PR is expected to be merged?

It has just been released 30 minutes ago. This issue should be resolved (I got mine working).

@rum-n
Copy link

rum-n commented Sep 21, 2021

I have the same issue. Still not working :/

@LinusU
Copy link
Collaborator

LinusU commented Sep 21, 2021

This was fixed in node-fetch 2.6.4, if you try to install canvas again, or run npm update node-fetch --depth=12 it should work!

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

No branches or pull requests