question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setup failed for github action: Command failed: /usr/bin/sudo npm install -g canvas vega vega-cli vega-lite @dvcorg/cml

See original GitHub issue

using the github action failed with this template

  • uses: iterative/setup-cml@v1 with: version: latest__

Run iterative/setup-cml@v1 with: version: latest env: pythonLocation: /opt/hostedtoolcache/Python/3.7.9/x64 LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.9/x64/lib Uninstalling previous CML Installing CML version latest Error: Command failed: /usr/bin/sudo npm install -g canvas vega vega-cli vega-lite @dvcorg/cml npm WARN deprecated tar.gz@1.0.7: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries not installable for canvas@2.6.1 and node@14.15.4 (node-v83 ABI, glibc) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/canvas/build’ gyp WARN EACCES current user (“nobody”) does not have permission to access the dev dir “/root/.cache/node-gyp/14.15.4” gyp WARN EACCES attempting to reinstall using temporary dev dir “/usr/local/lib/node_modules/canvas/.node-gyp” gyp WARN install got an error, rolling back install gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/canvas/.node-gyp’ gyp ERR! System Linux 5.4.0-1039-azure 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/local/lib/node_modules/canvas/build/Release/canvas.node” “–module_name=canvas” “–module_path=/usr/local/lib/node_modules/canvas/build/Release” “–napi_version=7” “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v83” gyp ERR! cwd /usr/local/lib/node_modules/canvas gyp ERR! node -v v14.15.4 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/local/lib/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/usr/local/lib/node_modules/canvas/build/Release --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83’ (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/canvas/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) node-pre-gyp ERR! System Linux 5.4.0-1039-azure node-pre-gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/canvas/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build” node-pre-gyp ERR! cwd /usr/local/lib/node_modules/canvas node-pre-gyp ERR! node -v v14.15.4 node-pre-gyp ERR! node-pre-gyp -v v0.11.0 node-pre-gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! canvas@2.6.1 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the canvas@2.6.1 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-02-05T01_11_39_828Z-debug.log

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidGOrtegacommented, Feb 6, 2021

@MeWu-IDM @cliffckerr those intermittent issues is something that sometimes happens due to several factors:

  • availability of the packages
  • discrepancies in GH runner’s virtual env, I mean, there are sometimes that the runners are running a version with bugs and they are not all aligned. or updated.

For us is very helpful this issue to keep an eye on that. Thanks!

0reactions
cliffckerrcommented, Feb 5, 2021

@DavidGOrtega @MeWu-IDM Super weird – just ran the exact same thing that was failing yesterday, and it worked fine! Run results here: https://github.com/InstituteforDiseaseModeling/synthpops/pull/62/checks?check_run_id=1841723229 Think this issue can be closed, sorry about that!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error on installation · Issue #275 · vega/vega - GitHub
I am trying to install vega with $ sudo npm install vega --save but all I get is > canvas@1.1.6 install ...
Read more >
Github Actions npm install fails without changes to package.json
The failure came from the following command: npm install. I have no idea why this is happening since I didn't change anthing about...
Read more >
npm ERR! Failed at the canvas@1.4.0 install script 'node-gyp ...
I am trying to deploy my app to digitalocean with dokku. Even if I have ssh'ed to digitalocean machine and ran a command...
Read more >
Yarn is not installed · Issue #182 · actions/setup-node - GitHub
I know on github-hosted runners, yarn is already pre-installed but it ... command not found ##[error]Process completed with exit code 127.
Read more >
Spec version warnings · Issue #767 · vega/vega-embed - GitHub
Hi, when running the HTML from the Vega-Lite tutorial, vega-embed shows two warnings about the spec version. The input spec uses Vega-Lite ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found