热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

NPM安装(Windows)抛出。sln错误…?-NPMInstall(Windows)throws.SLNerrors…?

ImworkingwithNode.js(andacoupleothernodemodules)andIvecomeacrossthisprobleminmult

I'm working with Node.js (and a couple other node modules) and I've come across this problem in multiple different projects now...

我处理节点。js(以及其他几个节点模块)我在多个不同的项目中遇到过这个问题……

With a lot (not all, but many) of node modules, when I try to install a module I get a similar error to this:

有很多(不是全部,而是很多)节点模块,当我尝试安装一个模块时,我得到了类似的错误:

C:\...\.node-gyp\0.8.16\deps\uv\include\uv.h(55): fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory [C:\...\AppData\Roaming\npm\node_modules\soap\node_modules\node-expat\build\binding.sln]

Project : warning PRJ0018: The following environment variables were not found: [C:\...\AppData\Roaming\npm\node_modules\soap\node_modules\node-expat\build\binding.sln]

With more than coincidental frequency, Node-Gyp seems to have something to do with it, I think... However I can't find anything suggesting what exactly would cause this.

除了巧合的频率,节点- gyp似乎与此有关,我认为……但是我找不到任何迹象表明到底是什么导致了这一切。

I'm running:

我运行:

-Node 0.8.x (Which I need for one of our custom modules),
-NPM 1.1.69
-Windows 7 x86

Examples of which modules I'm trying to use:

我正在尝试使用的模块示例:

-npm install soap
-npm install nodetime

1 个解决方案

#1


3  

Stumbled upon the reason. For Node-gyp to install properly on a Windows machine, you need Visual Studio C++ 2010 (Express or full suite). At a glance, I assumed this meant the MS C++ Redistributable packages, not the IDE.

偶然发现了原因。要在Windows机器上正确安装节点-gyp,需要Visual Studio c++ 2010 (Express或full suite)。乍一看,我认为这意味着MS c++可重分发包,而不是IDE。

I have VS2008 installed, but 2010 is the minimum requirement. Hope this helps saves someone else from a headache or two in the future, though!

我已经安装了VS2008,但2010年是最低要求。希望这能帮助别人在将来免于头痛!


推荐阅读
author-avatar
oq198608104_765
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有