D3.js 使用npm安装d3会导致上下文化错误

D3.js 使用npm安装d3会导致上下文化错误,d3.js,npm,D3.js,Npm,获得一些令人迷惑的contextify错误(但其他安装似乎进展顺利。) 在这一点上,你可能已经离开了,但对于未来的谷歌用户来说: 升级至D3.jsv3.5.4+ jsdom是d3的依赖项,jsdom需要contextify,它使用本机模块(节点gyp)。本机模块很难在某些平台上构建,因此从v3.5.4开始,d3就成为了jsdom的开发依赖项(默认情况下未安装) 相关:和。可能尝试npm安装--msvs\u version=2012?摘自,指向@meetamit谢谢,很有趣。我刚试过,但在同一个地

获得一些令人迷惑的contextify错误(但其他安装似乎进展顺利。)


在这一点上,你可能已经离开了,但对于未来的谷歌用户来说:

升级至D3.jsv3.5.4+

jsdom
d3
的依赖项,
jsdom
需要
contextify
,它使用本机模块(
节点gyp
)。本机模块很难在某些平台上构建,因此从v3.5.4开始,
d3
就成为了
jsdom
的开发依赖项(默认情况下未安装)


相关:和。

可能尝试
npm安装--msvs\u version=2012
?摘自,指向@meetamit谢谢,很有趣。我刚试过,但在同一个地方失败了。我尝试使用--verbose选项,它显示后续日志将要生成。\node\u modules\d3\node\u modules\jsdom后跟将要生成的
。\node\u modules\d3
。我不确定那是什么意思。。。(目前我已经手动安装了d3软件包)我希望我能给你10票。安装节点gyp是一件痛苦的事。
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