I'm trying to install PDFKit for node.js using the recommended command:
npm install pdfkit
However it fails with the following messages:
zlib#1.0.5 preinstall /home/woody/node_modules/pdfkit/node_modules/zlib
node-waf clean || true; node-waf configure build
sh: node-waf: not found
sh: node-waf: not found
npm ERR! error installing zlib#1.0.5 Error: zlib#1.0.5 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing zlib#1.0.5 `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 127
npm ERR! error installing zlib#1.0.5 at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing zlib#1.0.5 at ChildProcess.emit (events.js:67:17)
npm ERR! error installing zlib#1.0.5 at ChildProcess.onexit (child_process.js:192:12)
npm ERR! error installing pdfkit#0.1.5 Error: zlib#1.0.5 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing pdfkit#0.1.5 `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 127
npm ERR! error installing pdfkit#0.1.5 at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing pdfkit#0.1.5 at ChildProcess.emit (events.js:67:17)
npm ERR! error installing pdfkit#0.1.5 at ChildProcess.onexit (child_process.js:192:12)
npm ERR! zlib#1.0.5 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 127
npm ERR!
npm ERR! Failed at the zlib#1.0.5 preinstall script.
npm ERR! This is most likely a problem with the zlib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean || true; node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls zlib
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.32-33-generic-pae
npm ERR! command "node" "/usr/bin/npm" "install" "pdfkit"
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/woody/npm-debug.log
npm not ok
I'm running Ubuntu 10.04.3 LTS
If anyone has any help or suggestions, that'd be great - thanks.
You need install nodejs-dev package:
sudo apt-get install nodejs-dev
Related
I get the following error
-----> Installing dependencies with npm
> bignum#0.5.1 install /tmp/build_1xz3suiyqvjwh/node_modules/bignum
> node-gyp configure build
sh: node-gyp: not found
npm ERR! error installing bignum#0.5.1 Error: bignum#0.5.1 install: `node-gyp configure build`
npm ERR! error installing bignum#0.5.1 `sh "-c" "node-gyp configure build"` failed with 127
npm ERR! error installing bignum#0.5.1 at ChildProcess.<anonymous> (/tmp/node-npm-Pi2L/lib/utils/exec.js:49:20)
npm ERR! error installing bignum#0.5.1 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing bignum#0.5.1 at maybeExit (child_process.js:358:16)
npm ERR! error installing bignum#0.5.1 at Process.onexit (child_process.js:394:5)
npm ERR! bignum#0.5.1 install: `node-gyp configure build`
npm ERR! `sh "-c" "node-gyp configure build"` failed with 127
npm ERR!
npm ERR! Failed at the bignum#0.5.1 install script.
npm ERR! This is most likely a problem with the bignum package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls bignum
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.32-343-ec2
npm ERR! command "/tmp/node-node-8eWj/bin/node" "/tmp/node-npm-Pi2L/cli.js" "install" "--production"
npm ERR! cwd /tmp/build_1xz3suiyqvjwh
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.0.106
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_1xz3suiyqvjwh/npm-debug.log
npm not ok
! Failed to install --production dependencies with npm
! Heroku push rejected, failed to compile Node.js app
I got problem to install this package on heroku.
Is there a way to do it ?
I saw it's a problem with canvas module, but i don't know what to do.
This is a log of installation on heroku. I don't know how to get more :
npm ERR! canvas#0.12.1 preinstall: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the canvas#0.12.1 preinstall script.
npm ERR! 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-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls canvas
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-343-ec2
npm ERR! command "/tmp/node-node-La1F/bin/node" "/tmp/node-npm-6Xts/cli.js" "install" "--production"
npm ERR! cwd /tmp/build_3ejt8evom1p0g
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.41
npm ERR! code ELIFECYCLE
npm ERR! stack Error: canvas#0.12.1 preinstall: `node-waf configure build`
npm ERR! stack `sh "-c" "node-waf configure build"` failed with 1
npm ERR! stack at ChildProcess.<anonymous> (/tmp/node-npm-6Xts/lib/utils/exec.js:56:20)
npm ERR! stack at ChildProcess.emit (events.js:70:17)
npm ERR! stack at maybeExit (child_process.js:362:16)
npm ERR! stack at Process.onexit (child_process.js:398:5)
I successfully used this Heroku builpack:
https://elements.heroku.com/buildpacks/mojodna/heroku-buildpack-cairo
But in its README, it tells you to use heroku-buildpack-multi, that's deprecated. What I did was, using Heroku Toolbelt in command line:
heroku buildpacks:set --index 1 https://github.com/mojodna/heroku-buildpack-cairo.git
heroku buildpacks:add heroku/nodejs
And then push to Heroku so it can build packages again.
Getting into the world of node.js. Basically just starting out. I have installed node and got some things working. From my understanding I need to install the module jsdom to get jQuery working. So I downloaded and compiled NPM and when I ran the npm install jsdom command I got back a ton of errors. Here is the printout:
npm WARN htmlparser#1.7.3 package.json: bugs['web'] should probably be bugs['url']
> contextify#0.0.7 preinstall /usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify
> node-waf clean || true; node-waf configure build
Nothing to clean (project not configured)
Setting srcdir to : /usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify
Setting blddir to : /usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify/build
Checking for program g++ or c++ : not found
Checking for program icpc : not found
Checking for program c++ : not found
/usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify/wscript:11: error: could not configure a cxx compiler!
npm ERR! error installing contextify#0.0.7 Error: contextify#0.0.7 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing contextify#0.0.7 `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR! error installing contextify#0.0.7 at ChildProcess.<anonymous> (/usr/lib/nodejs/npm/lib/utils/exec.js:49:20)
npm ERR! error installing contextify#0.0.7 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing contextify#0.0.7 at maybeExit (child_process.js:359:16)
npm ERR! error installing contextify#0.0.7 at Process.onexit (child_process.js:395:5)
npm ERR! error installing jsdom#0.2.10 Error: contextify#0.0.7 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing jsdom#0.2.10 `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR! error installing jsdom#0.2.10 at ChildProcess.<anonymous> (/usr/lib/nodejs/npm/lib/utils/exec.js:49:20)
npm ERR! error installing jsdom#0.2.10 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing jsdom#0.2.10 at maybeExit (child_process.js:359:16)
npm ERR! error installing jsdom#0.2.10 at Process.onexit (child_process.js:395:5)
npm ERR! contextify#0.0.7 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the contextify#0.0.7 preinstall script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean || true; node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.35-27-virtual
npm ERR! command "node" "/usr/bin/npm" "install" "jsdom"
npm ERR! cwd /usr/lib/nodejs/npm/node_modules
npm ERR! node -v v0.6.2
npm ERR! npm -v 1.0.105
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/lib/nodejs/npm/node_modules/npm-debug.log
npm not ok
It obviously did not work.
Do I need this package to execute jQuery?
What am I doing wrong here?
Thanks.
Checking for program g++ or c++ : not found
You haven't installed the basic stuff needed for compiling things. On Debian and Ubuntu, this should fix it:
sudo apt-get install build-essential
For other distributions, the command is somewhat different, but the basic principle is the same.
Running npm install jasmine-jquery gives the error output seen below.
I'm running Windows 7. Any ideas?
npm install jasmine-jquery
npm http GET https://registry.npmjs.org/jasmine-jquery
npm http 304 https://registry.npmjs.org/jasmine-jquery
npm http GET https://registry.npmjs.org/jsdom
npm http 304 https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/contextify
> contextify#0.0.7 preinstall C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\contextify
> node-waf clean || (exit 0); node-waf configure build
Oväntat node-waf.
npm ERR! error installing contextify#0.0.7
npm ERR! error installing jsdom#0.2.10
npm ERR! Error: ENOENT, no such file or directory 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js'
npm ERR! Report this *entire* log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "jasmine-jquery"
npm ERR! cwd C:\node\messagemetrics
npm ERR! node -v v0.6.6
npm ERR! npm -v 1.1.0-beta-4
npm ERR! path C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js
npm ERR! fstream_path C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js'
npm ERR! fstream_stack Object.oncomplete (C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:204:26)
npm ERR! error rolling back jsdom#0.2.10 Error: UNKNOWN, unknown error 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___request.npm\package\tests'
npm ERR! error installing jasmine-jquery#1.3.3
npm ERR! error rolling back jasmine-jquery#1.3.3 Error: UNKNOWN, unknown error 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___request.npm\package'
npm ERR! contextify#0.0.7 preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! `cmd "/c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the contextify#0.0.7 preinstall script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean || (exit 0); node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "jasmine-jquery"
npm ERR! cwd C:\node\messagemetrics
npm ERR! node -v v0.6.6
npm ERR! npm -v 1.1.0-beta-4
npm ERR! code ELIFECYCLE
npm ERR! message contextify#0.0.7 preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! message `cmd "/c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\node\messagemetrics\npm-debug.log
npm not ok
Have you tried using sudo?
This worked for me: sudo npm install jasmine-jquery, let me know if this works for you.
I'm trying to install now.js on ubuntu 11.10 (running on windows with wubi, if that matters). I've downloaded and installed node, npm, and socket.io just fine, but sudo npm install now fails for some reason. I've tried with and without sudo, tried installing it globally, same error. Make is installed just fine...is it some problem with the node-proxy package? For what it's worth, trying npm install node-proxy produces a similar error.
node version 0.6.2
npm version 1.0.106
ubuntu 11.10 (windows with wubi)
The log reads, when I try to install now:
npm WARN node-proxy#0.5.2 package.json: bugs['web'] should probably be bugs['url']
> node-proxy#0.5.2 install /home/my_name/node_modules/now/node_modules/node-proxy
> make
BUILDING: C++ Component
/bin/sh: node-waf: not found
cp: cannot stat `src/build/*/node-proxy.node': No such file or directory
make: *** [all] Error 1
npm ERR! error installing node-proxy#0.5.2 Error: node-proxy#0.5.2 install: `make`
npm ERR! error installing node-proxy#0.5.2 `sh "-c" "make"` failed with 2
npm ERR! error installing node-proxy#0.5.2 at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing node-proxy#0.5.2 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing node-proxy#0.5.2 at maybeExit (child_process.js:359:16)
npm ERR! error installing node-proxy#0.5.2 at Process.onexit (child_process.js:395:5)
npm ERR! error installing now#0.7.6 Error: node-proxy#0.5.2 install: `make`
npm ERR! error installing now#0.7.6 `sh "-c" "make"` failed with 2
npm ERR! error installing now#0.7.6 at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing now#0.7.6 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing now#0.7.6 at maybeExit (child_process.js:359:16)
npm ERR! error installing now#0.7.6 at Process.onexit (child_process.js:395:5)
npm ERR! node-proxy#0.5.2 install: `make`
npm ERR! `sh "-c" "make"` failed with 2
npm ERR!
npm ERR! Failed at the node-proxy#0.5.2 install script.
npm ERR! This is most likely a problem with the node-proxy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! make
npm ERR! You can get their info via:
npm ERR! npm owner ls node-proxy
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.0.0-13-generic
npm ERR! command "node" "/usr/bin/npm" "install" "now"
npm ERR! cwd /home/my_name
npm ERR! node -v v0.6.2
npm ERR! npm -v 1.0.106
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/my_name/npm-debug.log
npm not ok
The issue appears to be that node-waf is missing.
node-waf is a tool that is included with node which allows compiling binary modules, such as node-proxy.
You can test to see if node-waf is available simply by typing node-waf into the terminal to see if the command can be found. If not, you will need to reinstall node (run make install again) to make sure node-waf is available.