Reputation: 775
I can't succeed with npm install packages after $npm install, it shows this output:
> [email protected] install /home/samuel/testes/Avanade Angular Academy by Gama/gama-avanade-tryout01/node_modules/canvas
> node-gyp rebuild
./util/has_lib.sh: 31: ./util/has_lib.sh: pkg-config: 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 (/home/samuel/.npm-global/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Linux 4.9.0-4-amd64
gyp ERR! command "/usr/bin/node" "/home/samuel/.npm-global/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/samuel/testes/Avanade Angular Academy by Gama/gama-avanade-tryout01/node_modules/canvas
gyp ERR! node -v v6.12.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /home/samuel/.npm/_logs/2017-12-12T02_40_55_700Z-debug.log
What should I do? Thanks for all of you help!
Upvotes: 2
Views: 3024
Reputation: 775
The solution is to install some external dependencies. The commands below were enough.
$ sudo apt-get update
$ sudo apt-get install libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++
After this, $npm install works!
Upvotes: 3
Reputation: 1079
delete node modules and package-lock.json
1.yarn install or npm install 2.npm start
Upvotes: 0