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 [email protected] package.json: bugs[ web ] should probably be bugs[ url ]
> [email protected] 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 [email protected] Error: [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing [email protected] `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR! error installing [email protected] at ChildProcess.<anonymous> (/usr/lib/nodejs/npm/lib/utils/exec.js:49:20)
npm ERR! error installing [email protected] at ChildProcess.emit (events.js:70:17)
npm ERR! error installing [email protected] at maybeExit (child_process.js:359:16)
npm ERR! error installing [email protected] at Process.onexit (child_process.js:395:5)
npm ERR! error installing [email protected] Error: [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing [email protected] `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR! error installing [email protected] at ChildProcess.<anonymous> (/usr/lib/nodejs/npm/lib/utils/exec.js:49:20)
npm ERR! error installing [email protected] at ChildProcess.emit (events.js:70:17)
npm ERR! error installing [email protected] at maybeExit (child_process.js:359:16)
npm ERR! error installing [email protected] at Process.onexit (child_process.js:395:5)
npm ERR! [email protected] 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 [email protected] 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
它显然没有工作。
- Do I need this package to execute jQuery?
- What am I doing wrong here?
感谢。