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.

Canvas installation is a problem.

See original GitHub issue

Hello, i am new on Node and trying to build a barcode generator based on data i pass, and i want to write that on pdf.

while I am able to install library for barcode, unable to install canvas - getting the following error.

canvas@1.6.3 install /Users/rahil/Documents/projects/tesco/node-pdf-download/node_modules/canvas

node-gyp rebuild

./util/has_lib.sh: line 31: pkg-config: command 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:305: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:215:12) gyp ERR! System Darwin 15.6.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/rahil/Documents/projects/tesco/node-pdf-download/node_modules/canvas gyp ERR! node -v v7.2.1 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN node-pdf-download@1.0.0 No description npm WARN node-pdf-download@1.0.0 No repository field. npm ERR! Darwin 15.6.0 npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “canvas” npm ERR! node v7.2.1 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE

npm ERR! canvas@1.6.3 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the canvas@1.6.3 install script ‘node-gyp rebuild’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the canvas package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs canvas npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls canvas npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/rahil/Documents/projects/tesco/node-pdf-download/npm-debug.log

Do i really need canvas, or can is there an alternative. Also, if you could help me to get this in pdf. I am using PDFKIT.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
lindellcommented, Feb 21, 2017

The nodejs version is currently requiring node-canvas

Here is how to install it.

https://github.com/Automattic/node-canvas#installation

0reactions
rahillakhanicommented, Feb 21, 2017

Great, i think bwip would be quiet helpful

thanks a ton for quick reply…

Good day

Read more comments on GitHub >

github_iconTop Results From Across the Web

error when installing Canvas node-gyp rebuild #913 - GitHub
Issue or Feature error when installing with npm Steps to Reproduce sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev ...
Read more >
Error while installing canvas sandbox environment on Ubuntu
As a workaround I am trying to install a sandbox on Ubuntu 18.0. using below link (Automated setup), but it ran into issues...
Read more >
canvas - npm
11+ and are experiencing trouble when compiling, run the following command: xcode-select --install . Read more about the problem on Stack ...
Read more >
problem installing canvas on ubuntu,Bundler could not find ...
I'm trying to install canvas lms , but I have faced with the following issue. Any help. enter image description hereplease Bundler could...
Read more >
Installing Kami's Paid Canvas LTI Integration Manually
Instructions for installing Kami in Canvas and some tips to avoid known issues.
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