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.

can't install dependencies

See original GitHub issue

https://www.youtube.com/watch?v=SD1DTrlJeKM

Following this video, I’m getting errors at “yarn add all” step

forrestplatt@Forrests-MacBook-Air generative-art-opensource % yarn add all
yarn add v1.22.17
warning ../package.json: No license field
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
error /Users/forrestplatt/generative-art-opensource/node_modules/canvas: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments: 
Directory: /Users/forrestplatt/generative-art-opensource/node_modules/canvas
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@1.0.6
node-pre-gyp info using node@16.13.0 | darwin | arm64
node-pre-gyp info check checked for "/Users/forrestplatt/generative-art-opensource/node_modules/canvas/build/Release/canvas.node" (not found)
node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v93-darwin-unknown-arm64.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v93-darwin-unknown-arm64.tar.gz 
node-pre-gyp WARN Pre-built binaries not installable for canvas@2.8.0 and node@16.13.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v93-darwin-unknown-arm64.tar.gz 
gyp info it worked if it ends with ok
gyp info using node-gyp@8.2.0
gyp info using node@16.13.0 | darwin | arm64
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@8.2.0
gyp info using node@16.13.0 | darwin | arm64
gyp info find Python using Python version 3.8.9 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/forrestplatt/generative-art-opensource/node_modules/canvas/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/forrestplatt/Library/Caches/node-gyp/16.13.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/forrestplatt/Library/Caches/node-gyp/16.13.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/forrestplatt/Library/Caches/node-gyp/16.13.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/forrestplatt/generative-art-opensource/node_modules/canvas',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
/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 
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:353:16)
gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 20.6.0
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=/Users/forrestplatt/generative-art-opensource/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/forrestplatt/generative-art-opensource/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
gyp ERR! cwd /Users/forrestplatt/generative-art-opensource/node_modules/canvas
gyp ERR! node -v v16.13.0
gyp ERR! node-gyp -v v8.2.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=/Users/forrestplatt/generative-art-opensource/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/forrestplatt/generative-art-opensource/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/forrestplatt/generative-art-opensource/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
node-pre-gyp ERR! System Darwin 20.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/forrestplatt/generative-art-opensource/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/forrestplatt/generative-art-opensource/node_modules/canvas
node-pre-gyp ERR! node -v v16.13.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.6
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=/Users/forrestplatt/generative-art-opensource/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/forrestplatt/generative-art-opensource/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

https://stackoverflow.com/questions/69841829/errors-in-yarn-add-all

Is this a M1 Macbook issue?

I’m new to coding. Thanks for any help

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
talmax1124commented, Dec 7, 2021

Just install the python language and use an older version of Node

Have you tried this on an M1 Mac, and if so did it work?

Yes it did work like that. Or try using NVM

1reaction
talmax1124commented, Dec 4, 2021

Just install the python language and use an older version of Node

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix the 'Required Dependencies' error in VALORANT
Restart your computer or wait the error out · Uninstall Vanguard · Ensure your operating system and graphics drivers are updated · Disable...
Read more >
Easily Fix Valorant We Couldn't Install a Required Dependency
Easily Fix Valorant We Couldn't Install a Required Dependency [Partition Manager] · Step 1: Press Windows key + R to open the Run...
Read more >
Valorant: How to fix the 'Required Dependencies' error
Restart PC or Uninstall and Re-install Valorant ... First and foremost, the Required Dependencies error is one that stems from the device itself, ......
Read more >
How to Fix “Failed to Install a Dependency” on Kodi
Fix “Failed to Install a Dependency” on Kodi · 1. Clear the Kodi Cache · 2. Clear the Kodi Data · 3. Remove...
Read more >
How to Fix Valorant Couldn't Install Required Dependency
How to Fix Valorant Couldn't Install Required Dependency · Right-click on the Riot Vanguard icon > Click on Exit Vanguard. · Then the...
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