admin管理员组

文章数量:1356701

I'm trying to get my app to run locally. In an attempt to install NPM in the folder I am receiving an error when it hits to:

npm ERR! error installing [email protected]

I have searched the web but all of the results turned up people getting errors get in Windows7. Im using OSX. I have XCode installed.

Below you will find the whole print out:

gorteks$ npm install
npm http GET 
npm http 304 
npm http GET 
npm http GET 
npm http 304 
npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url']
npm http 304 
npm http GET 
npm http GET 
npm http 304 
npm http 304 

> [email protected] preinstall /Users/gorteks/Sites/digidj-app/node_modules/jquery/node_modules/jsdom/node_modules/contextify
> node-waf clean || (exit 0); node-waf configure build

Nothing to clean (project not configured)
Setting srcdir to                        : /Users/gorteks/Sites/digidj-   app/node_modules/jquery/node_modules/jsdom/node_modules/contextify 
Setting blddir to                        : /Users/gorteks/Sites/digidj-app/node_modules/jquery/node_modules/jsdom/node_modules/contextify/build 
Checking for program g++ or c++          : not found 
/Users/gorteks/Sites/digidj-  app/node_modules/jquery/node_modules/jsdom/node_modules/contextify/wscript:11: error: could   not configure a cxx piler!
npm ERR! error installing [email protected]
npm ERR! error installing [email protected]
npm ERR! error installing [email protected]
npm ERR! [email protected] preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! `sh "-c" "node-waf clean || (exit 0); 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 || (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 Darwin 10.8.0
npm ERR! mand "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/gorteks/Sites/digidj-app
npm ERR! node -v v0.6.7
npm ERR! npm -v 1.1.0-beta-10
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] preinstall: `node-waf clean || (exit 0); node-waf       configure build`
npm ERR! message `sh "-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!     /Users/gorteks/Sites/digidj-app/npm-debug.log
npm not ok

Thanks for all your help guys!

I'm trying to get my app to run locally. In an attempt to install NPM in the folder I am receiving an error when it hits to:

npm ERR! error installing [email protected]

I have searched the web but all of the results turned up people getting errors get in Windows7. Im using OSX. I have XCode installed.

Below you will find the whole print out:

gorteks$ npm install
npm http GET https://registry.npmjs/jquery
npm http 304 https://registry.npmjs/jquery
npm http GET https://registry.npmjs/jsdom
npm http GET https://registry.npmjs/htmlparser
npm http 304 https://registry.npmjs/htmlparser
npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url']
npm http 304 https://registry.npmjs/jsdom
npm http GET https://registry.npmjs/cssom
npm http GET https://registry.npmjs/contextify
npm http 304 https://registry.npmjs/cssom
npm http 304 https://registry.npmjs/contextify

> [email protected] preinstall /Users/gorteks/Sites/digidj-app/node_modules/jquery/node_modules/jsdom/node_modules/contextify
> node-waf clean || (exit 0); node-waf configure build

Nothing to clean (project not configured)
Setting srcdir to                        : /Users/gorteks/Sites/digidj-   app/node_modules/jquery/node_modules/jsdom/node_modules/contextify 
Setting blddir to                        : /Users/gorteks/Sites/digidj-app/node_modules/jquery/node_modules/jsdom/node_modules/contextify/build 
Checking for program g++ or c++          : not found 
/Users/gorteks/Sites/digidj-  app/node_modules/jquery/node_modules/jsdom/node_modules/contextify/wscript:11: error: could   not configure a cxx piler!
npm ERR! error installing [email protected]
npm ERR! error installing [email protected]
npm ERR! error installing [email protected]
npm ERR! [email protected] preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! `sh "-c" "node-waf clean || (exit 0); 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 || (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 Darwin 10.8.0
npm ERR! mand "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/gorteks/Sites/digidj-app
npm ERR! node -v v0.6.7
npm ERR! npm -v 1.1.0-beta-10
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] preinstall: `node-waf clean || (exit 0); node-waf       configure build`
npm ERR! message `sh "-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!     /Users/gorteks/Sites/digidj-app/npm-debug.log
npm not ok

Thanks for all your help guys!

Share Improve this question edited Jan 13, 2012 at 1:26 David Diliberto asked Jan 13, 2012 at 1:15 David DilibertoDavid Diliberto 832 silver badges9 bronze badges 1
  • update node, update npm, try again. If it still fails, plain to the author of contextify – user578895 Commented Jan 13, 2012 at 1:17
Add a ment  | 

4 Answers 4

Reset to default 4

I used Xcode 4.3 from the Apple App Store and I had to install the Unix Command line tools. This can be done via Xcode -> Preferences -> Downloads -> Command Line Tools

"error: could not configure a cxx piler!"

You need a C++ piler. Your using OSX, so you need to install XCode.

Here is a SO answer on the issue that include various ways to solve this error for different OSs/Distros:

How to pile/install node.js(could not configure a cxx piler!) (Ubuntu).

download the latest version of Xcode, upgrade from 4.0 to 4.1

FIXED! Heres what worked for me. I installed Lion and updated XCode. Simple but time consuming.

本文标签: javascriptNPM Install errorStack Overflow