使用npm安装d3会导致上下文错误

Din*_*esh 5 npm d3.js

得到一些神秘的上下文错误(但其他安装似乎没问题.)

npm install d3

    MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install
Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  
[C:\Users\dinesh\m3\node_modules\d3\node_modules\jsdom\node_modules\contextify\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\dinesh\m3\node_modules\d3\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok

npm ERR! contextify@0.1.9 install: `node-gyp rebuild`
npm ERR! Exit status 1

npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
Run Code Online (Sandbox Code Playgroud)

Tim*_*ean 14

你可能已经开始了,但是对于未来的googlers:

升级到D3.js v3.5.4 +

jsdom是使用本机模块()的依赖关系d3,并且jsdom需要contextifynode-gyp.本机模块是很难建立在某些平台上,所以d3jsdom一个发展的依赖(默认不安装)为v3.5.4的.

相关:D3.js提交D3.js问题.

  • 我希望能给你 10 票。安装“node-gyp”很痛苦。 (2认同)