Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install CamanJS with npm #226

Open
nop33 opened this issue Oct 19, 2017 · 8 comments
Open

Cannot install CamanJS with npm #226

nop33 opened this issue Oct 19, 2017 · 8 comments

Comments

@nop33
Copy link

nop33 commented Oct 19, 2017

› npm install caman

> [email protected] install /Users/myusername/dev/project-title/dev/node_modules/canvas
> node-gyp rebuild

Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' 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:336:16)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/Cellar/node/8.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/myusername/dev/project-title/dev/node_modules/canvas
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No repository field.

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!     /Users/myusername/.npm/_logs/2017-10-19T13_19_12_145Z-debug.log

In /Users/myusername/.npm/_logs/2017-10-19T13_19_12_145Z-debug.log:

...
400 verbose stack Error: [email protected] install: `node-gyp rebuild`
400 verbose stack Exit status 1
400 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
400 verbose stack     at emitTwo (events.js:125:13)
400 verbose stack     at EventEmitter.emit (events.js:213:7)
400 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
400 verbose stack     at emitTwo (events.js:125:13)
400 verbose stack     at ChildProcess.emit (events.js:213:7)
400 verbose stack     at maybeClose (internal/child_process.js:927:16)
400 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
401 verbose pkgid [email protected]
402 verbose cwd /Users/myusername/dev/project-title/dev
403 verbose Darwin 16.7.0
404 verbose argv "/usr/local/Cellar/node/8.6.0/bin/node" "/usr/local/bin/npm" "install" "caman"
405 verbose node v8.6.0
406 verbose npm  v5.5.1
407 error code ELIFECYCLE
408 error errno 1
409 error [email protected] install: `node-gyp rebuild`
409 error Exit status 1
410 error Failed at the [email protected] install script.
410 error This is probably not a problem with npm. There is likely additional logging output above.
411 verbose exit [ 1, true ]

Version of npm:

› npm -v
5.5.1
@guilhermedelucas
Copy link

Same with npm 4.0.5

@zhengyongxiong
Copy link

Environmental variable problem

@zhengyongxiong
Copy link

you should add the path

@AndreyPatseiko
Copy link

zhengyongxiong - can tell us in more detail!!

@javascriptlove
Copy link

On server side it depends on libcairo2 library, see the answer here: https://stackoverflow.com/a/27705973/266561

@kakaggarwal
Copy link

You need to complete the node-canvas dependencies first then you will be able to install caman. I was able to successfully npm install caman through this approach.

@WanderHuang
Copy link

  • I met same problem and solved it by Installing node-gyp & Installing GTK 2
  • you need this.node-canvas[wiki].

@furyOO7
Copy link

furyOO7 commented Jul 2, 2019

I'm facing the above issue, I tried everything suggested in comments and nothing seems to work. Can anyone guide me here!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants