本文介绍了为什么node-gyp(和其他东西)需要Visual Studio?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

node-gyp不是我遇到的第一件事,但这似乎很奇怪.我认为这与构建可执行文件或插件有关,但是没有比完整版本的Visual Studio或VS Express小的依赖项可以满足要求吗?尽管您确实愿意,但我实际上可以在没有VS副本的情况下编写,构建和运行.net应用程序.我的目的是至少学习一些C ++或尝试解决该问题所需要的其他知识,尽管我认为,如果乔伊特(Joyent)不能很容易地找到解决它的方法,这是不平凡的.

node-gyp isn't the first thing I've run into requiring it, but this seems odd. I assume this has something to do with building executables or plugins or whatever but is there no dependency smaller than a complete version of Visual Studio or VS Express that can fit the bill? I though you could actually write, build and run .net apps without a copy of VS if you really wanted to. I ask with intent to at least learn some C++ or whatever else it takes while attempting to address the problem although I imagine it's nontrivial if Joyent couldn't find a way around it easily enough.

注意:node-gyp作为节点依赖项没有问题,但是有此问题的Windows用户应尝试通过从Web下载并从该exe文件重新安装来更新节点,然后再执行其他任何疯狂操作.我勉强躲开了.他们似乎已经修复了仅2010年的问题,而没有真正大声地宣布它,并且在尝试在Windows上更新自身和Node时npm并没有真正起作用.

Note: I'm not having a problem with node-gyp as a node dependency but Windows users with that issue should try updating node by downloading from the web and reinstalling from that exe file before doing any of the other madness out there that I narrowly dodged. They seem to have fixed the 2010-only issue without really announcing it very loudly and npm doesn't really work when attempting to update itself and Node on Windows.

推荐答案

它在没有Visual Studio的情况下也可以使用,但是您需要安装Windows SDK:

It works without Visual Studio, but you'll need to install Windows SDK:

  1. https://www.microsoft.com获取Windows SDK. com/en-us/download/details.aspx?id = 8442
  2. 使用桌面上的"SDK命令行"快捷方式启动npm install

我在这里找到了此解决方案: https://github.com/nodejs/node-gyp/issues/629#issuecomment-138276692

I found this solution here: https://github.com/nodejs/node-gyp/issues/629#issuecomment-138276692

这篇关于为什么node-gyp(和其他东西)需要Visual Studio?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 03:22