HashLips / generative-art-opensource

Create generative art by using the canvas api and node js, feel free to contribute to this repo with new ideas.
MIT License
1.36k stars 695 forks source link

can't install dependencies #169

Open FP530 opened 2 years ago

FP530 commented 2 years ago

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

haaptics commented 2 years ago

same exact issue on the new MacBook

sven2011 commented 2 years ago

I have the same issue on new MacBook Pro

talmax1124 commented 2 years ago

Yes I have the same issue. Any resolutions?

FP530 commented 2 years ago

No I am waiting for somebody who is more familiar than me with the programming to see this post and propose a solution. The stack overflow link shows how far I got

Sent from my iPhone

On Nov 27, 2021, at 6:08 PM, Carlos @.***> wrote:

ļ»æ Yes I have the same issue. Any resolutions?

ā€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

talmax1124 commented 2 years ago

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

FP530 commented 2 years ago

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?

talmax1124 commented 2 years ago

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

FP530 commented 2 years ago

This did work for me as well. Thanks a lot, I've been struggling to overcome this for over a month

The7thRush commented 2 years ago

Hi, I'm new here.

I know very very very little about coding and I'm facing the exact same issue.

as soon as I enter the command nmp install I get this : npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm ERR! code 1

and a loooooooooonnnn list of npm ERR!

I am using a M1 MAC MINI.

any help is appreciated :)

thanks

enriktigasna commented 2 years ago

I found a solution, make sure to downgrade node to 10.18.0.

To up and downgrade easily use "npm install -g n"

and then you can just "n 10.18.0"

also make sure to try to sudo if something is going wrong. Hope this helps šŸ‘

Stabrus77777 commented 2 years ago

tryed that. Still the same mistake :(

"