qrohlf / trianglify

Algorithmically generated triangle art
http://qrohlf.com/trianglify/
GNU General Public License v3.0
10.08k stars 669 forks source link

Error running install script for optional dependency #104

Closed eDubrovsky closed 4 years ago

eDubrovsky commented 5 years ago

When im install package, i see this error. I use only svg() for generate trianglify


Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/Dubrovsky/git/Filmustage_github/filmustage-frontend/node_modules/canvas
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@11.13.0 | darwin | x64
gyp info spawn /usr/bin/python
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/Dubrovsky/git/Filmustage_github/filmustage-frontend/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/Dubrovsky/.node-gyp/11.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/Dubrovsky/.node-gyp/11.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/Dubrovsky/.node-gyp/11.13.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/Dubrovsky/git/Filmustage_github/filmustage-frontend/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=.' ]
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'gobject-2.0', not found
gyp: Call to './util/has_lib.sh freetype' returned exit status 0 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:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command \"/usr/local/bin/node\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /Users/Dubrovsky/git/Filmustage_github/filmustage-frontend/node_modules/canvas
gyp ERR! node -v v11.13.0```
alexgausman commented 5 years ago

+1 Would love to know if anyone knows of a solution.

qrohlf commented 5 years ago

See the manpage for npm install: https://docs.npmjs.com/cli/install

The --no-optional argument will prevent optional dependencies from being installed.

If npm install --no-optional doesn't solve your issue, I'll need information about the platform (OS version, node version, npm version) that you're trying to develop on.