NPM安装错误 [英] NPM Install error
本文介绍了NPM安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试让我的应用在本地运行。在尝试在文件夹中安装NPM时,我遇到错误:
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 contextify@0.0.7
我在网上搜索过但所有搜索结果都显示给了人们在Windows7中出现错误。我在使用OSX。我安装了XCode。
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.org/jquery
npm http 304 https://registry.npmjs.org/jquery
npm http GET https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/htmlparser
npm WARN htmlparser@1.7.3 package.json: bugs['web'] should probably be bugs['url']
npm http 304 https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/contextify
> contextify@0.0.7 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 compiler!
npm ERR! error installing contextify@0.0.7
npm ERR! error installing jsdom@0.2.10
npm ERR! error installing jquery@1.6.3
npm ERR! contextify@0.0.7 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 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 Darwin 10.8.0
npm ERR! command "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 contextify@0.0.7 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!
推荐答案
我在Apple App Store中使用了Xcode 4.3,我不得不安装Unix命令行工具。这可以通过Xcode - >首选项 - >下载 - >命令行工具
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
这篇关于NPM安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文