2014-06-13 32 views
0

我一直在嘗試與D3一起使用total.js來創建樹可視化。我無法下載D3。我做的:D3.js與Total.js/node.js

npm install D3 

我得到:

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install 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-gyp rebuild 
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! System Darwin 12.5.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "d3" 
npm ERR! cwd /Users/grantherman/Desktop/vendorTool/node_modules 
npm ERR! node -v v0.10.28 
npm ERR! npm -v 1.4.9 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /Users/grantherman/Desktop/vendorTool/node_modules/npm-debug.log 
npm ERR! not ok code 0 

我試圖contextify下載,但我得到了同樣的事情。我已經成功下載了gyp,但是如果我嘗試下載D3.js,它似乎不起作用。

+0

也許不是什麼是錯的,但你可以試試'NPM安裝d3'其中d是不是大寫?不確定npm是否區分大小寫。 – aug

回答

0

嘗試下載最新版本的node.js(使用node.js v0.12.0一切正常)。

0

更新新公共管理和使用小寫D3

更新NPM:

npm install -g npm可能需要sudo

安裝D3:

npm install d3

注:這將安裝d3我n您的當前位置安裝globally使用:

sudo npm install d3 -g