我一直在尝试使用total.js和D3来创建树的可视化效果。我无法下载D3。我有:
npm install D3 我得到了:
npm ERR! contextify@0.1.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.8 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,它似乎不起作用。
发布于 2015-03-17 19:08:57
尝试下载最新版本的node.js (使用node.js v0.12.0,一切正常)。
发布于 2015-03-17 19:12:03
更新npm并使用小写d3
更新npm:
npm install -g npm可能需要sudo
安装d3:
npm install d3
注意:这将在您的当前位置安装d3,以便使用以下命令安装globally:
sudo npm install d3 -g
https://stackoverflow.com/questions/24210607
复制相似问题