比较来自世界各地的卖家的域名和 IT 服务价格

npm install -g karma error MSB4019: 进口项目 "C:\Microsoft.Cpp.Default.props" 未找到

我在学习
http://docs.angularjs.org/tutorial
并遵循其安装步骤,但在开始阶梯时,我会出错 #1:


npm install -g karma


这是完整的结论:


Microsoft Windows [Version 6.2.9200]
/c/ 2012 Microsoft Corporation. All rights reserved.

C:\Users\Travis>node --version
v0.10.18

C:\Users\Travis>python --version
Python 2.7.3

C:\Users\Travis>npm install -g karma
npm http GET [url=https://registry.npmjs.org/karma]https://registry.npmjs.org/karma[/url]
npm http 304 [url=https://registry.npmjs.org/karma]https://registry.npmjs.org/karma[/url]
npm http GET [url=https://registry.npmjs.org/di]https://registry.npmjs.org/di[/url]
npm http GET [url=https://registry.npmjs.org/socket.io]https://registry.npmjs.org/socket.io[/url]
npm http GET [url=https://registry.npmjs.org/chokidar]https://registry.npmjs.org/chokidar[/url]
npm http GET [url=https://registry.npmjs.org/coffee-script]https://registry.npmjs.org/coffee-script[/url]
npm http GET [url=https://registry.npmjs.org/http-proxy]https://registry.npmjs.org/http-proxy[/url]
npm http GET [url=https://registry.npmjs.org/colors/0.6.0-1]https://registry.npmjs.org/colors/0.6.0-1[/url]
npm http GET [url=https://registry.npmjs.org/rimraf]https://registry.npmjs.org/rimraf[/url]
npm http GET [url=https://registry.npmjs.org/minimatch]https://registry.npmjs.org/minimatch[/url]
npm http GET [url=https://registry.npmjs.org/mime]https://registry.npmjs.org/mime[/url]
npm http GET [url=https://registry.npmjs.org/useragent]https://registry.npmjs.org/useragent[/url]
npm http GET [url=https://registry.npmjs.org/graceful-fs]https://registry.npmjs.org/graceful-fs[/url]
npm http GET [url=https://registry.npmjs.org/lodash]https://registry.npmjs.org/lodash[/url]
npm http GET [url=https://registry.npmjs.org/log4js]https://registry.npmjs.org/log4js[/url]
npm http GET [url=https://registry.npmjs.org/q]https://registry.npmjs.org/q[/url]
npm http GET [url=https://registry.npmjs.org/glob]https://registry.npmjs.org/glob[/url]
npm http GET [url=https://registry.npmjs.org/connect]https://registry.npmjs.org/connect[/url]
npm http GET [url=https://registry.npmjs.org/optimist]https://registry.npmjs.org/optimist[/url]
npm http 304 [url=https://registry.npmjs.org/socket.io]https://registry.npmjs.org/socket.io[/url]
npm http 304 [url=https://registry.npmjs.org/di]https://registry.npmjs.org/di[/url]
npm http 304 [url=https://registry.npmjs.org/chokidar]https://registry.npmjs.org/chokidar[/url]
npm http 304 [url=https://registry.npmjs.org/coffee-script]https://registry.npmjs.org/coffee-script[/url]
npm http 304 [url=https://registry.npmjs.org/colors/0.6.0-1]https://registry.npmjs.org/colors/0.6.0-1[/url]
npm http 304 [url=https://registry.npmjs.org/http-proxy]https://registry.npmjs.org/http-proxy[/url]
npm http 304 [url=https://registry.npmjs.org/rimraf]https://registry.npmjs.org/rimraf[/url]
npm http 304 [url=https://registry.npmjs.org/minimatch]https://registry.npmjs.org/minimatch[/url]
npm http 304 [url=https://registry.npmjs.org/mime]https://registry.npmjs.org/mime[/url]
npm http 304 [url=https://registry.npmjs.org/useragent]https://registry.npmjs.org/useragent[/url]
npm http 304 [url=https://registry.npmjs.org/graceful-fs]https://registry.npmjs.org/graceful-fs[/url]
npm http 304 [url=https://registry.npmjs.org/lodash]https://registry.npmjs.org/lodash[/url]
npm http 304 [url=https://registry.npmjs.org/log4js]https://registry.npmjs.org/log4js[/url]
npm http 304 [url=https://registry.npmjs.org/q]https://registry.npmjs.org/q[/url]
npm http 304 [url=https://registry.npmjs.org/glob]https://registry.npmjs.org/glob[/url]
npm http 304 [url=https://registry.npmjs.org/connect]https://registry.npmjs.org/connect[/url]
npm http 304 [url=https://registry.npmjs.org/optimist]https://registry.npmjs.org/optimist[/url]
npm http GET [url=https://registry.npmjs.org/lru-cache]https://registry.npmjs.org/lru-cache[/url]
npm http GET [url=https://registry.npmjs.org/sigmund]https://registry.npmjs.org/sigmund[/url]
npm http GET [url=https://registry.npmjs.org/inherits]https://registry.npmjs.org/inherits[/url]
npm http GET [url=https://registry.npmjs.org/wordwrap]https://registry.npmjs.org/wordwrap[/url]
npm http GET [url=https://registry.npmjs.org/socket.io-client/0.9.16]https://registry.npmjs.org/socket.io-client/0.9.16[/url]
npm http GET [url=https://registry.npmjs.org/policyfile/0.0.4]https://registry.npmjs.org/policyfile/0.0.4[/url]
npm http GET [url=https://registry.npmjs.org/base64id/0.1.0]https://registry.npmjs.org/base64id/0.1.0[/url]
npm http GET [url=https://registry.npmjs.org/redis/0.7.3]https://registry.npmjs.org/redis/0.7.3[/url]
npm http 304 [url=https://registry.npmjs.org/sigmund]https://registry.npmjs.org/sigmund[/url]
npm http 304 [url=https://registry.npmjs.org/lru-cache]https://registry.npmjs.org/lru-cache[/url]
npm http 304 [url=https://registry.npmjs.org/policyfile/0.0.4]https://registry.npmjs.org/policyfile/0.0.4[/url]
npm http 304 [url=https://registry.npmjs.org/base64id/0.1.0]https://registry.npmjs.org/base64id/0.1.0[/url]
npm http 304 [url=https://registry.npmjs.org/wordwrap]https://registry.npmjs.org/wordwrap[/url]
npm http 304 [url=https://registry.npmjs.org/redis/0.7.3]https://registry.npmjs.org/redis/0.7.3[/url]
npm http 304 [url=https://registry.npmjs.org/inherits]https://registry.npmjs.org/inherits[/url]
npm http 304 [url=https://registry.npmjs.org/socket.io-client/0.9.16]https://registry.npmjs.org/socket.io-client/0.9.16[/url]
npm http GET [url=https://registry.npmjs.org/pkginfo]https://registry.npmjs.org/pkginfo[/url]
npm http GET [url=https://registry.npmjs.org/utile]https://registry.npmjs.org/utile[/url]
npm http GET [url=https://registry.npmjs.org/qs/0.6.5]https://registry.npmjs.org/qs/0.6.5[/url]
npm http GET [url=https://registry.npmjs.org/cookie-signature/1.0.1]https://registry.npmjs.org/cookie-signature/1.0.1[/url]
npm http GET [url=https://registry.npmjs.org/formidable/1.0.14]https://registry.npmjs.org/formidable/1.0.14[/url]
npm http GET [url=https://registry.npmjs.org/cookie/0.1.0]https://registry.npmjs.org/cookie/0.1.0[/url]
npm http GET [url=https://registry.npmjs.org/buffer-crc32/0.2.1]https://registry.npmjs.org/buffer-crc32/0.2.1[/url]
npm http GET [url=https://registry.npmjs.org/send/0.1.4]https://registry.npmjs.org/send/0.1.4[/url]
npm http GET [url=https://registry.npmjs.org/bytes/0.2.0]https://registry.npmjs.org/bytes/0.2.0[/url]
npm http GET [url=https://registry.npmjs.org/fresh/0.2.0]https://registry.npmjs.org/fresh/0.2.0[/url]
npm http GET [url=https://registry.npmjs.org/pause/0.0.1]https://registry.npmjs.org/pause/0.0.1[/url]
npm http GET [url=https://registry.npmjs.org/uid2/0.0.2]https://registry.npmjs.org/uid2/0.0.2[/url]
npm http GET [url=https://registry.npmjs.org/debug]https://registry.npmjs.org/debug[/url]
npm http GET [url=https://registry.npmjs.org/methods/0.0.1]https://registry.npmjs.org/methods/0.0.1[/url]
npm http 304 [url=https://registry.npmjs.org/pkginfo]https://registry.npmjs.org/pkginfo[/url]
npm http 304 [url=https://registry.npmjs.org/utile]https://registry.npmjs.org/utile[/url]
npm http 304 [url=https://registry.npmjs.org/qs/0.6.5]https://registry.npmjs.org/qs/0.6.5[/url]
npm http 304 [url=https://registry.npmjs.org/cookie/0.1.0]https://registry.npmjs.org/cookie/0.1.0[/url]
npm http 304 [url=https://registry.npmjs.org/cookie-signature/1.0.1]https://registry.npmjs.org/cookie-signature/1.0.1[/url]
npm http 304 [url=https://registry.npmjs.org/buffer-crc32/0.2.1]https://registry.npmjs.org/buffer-crc32/0.2.1[/url]
npm http 304 [url=https://registry.npmjs.org/send/0.1.4]https://registry.npmjs.org/send/0.1.4[/url]
npm http 304 [url=https://registry.npmjs.org/bytes/0.2.0]https://registry.npmjs.org/bytes/0.2.0[/url]
npm http 304 [url=https://registry.npmjs.org/fresh/0.2.0]https://registry.npmjs.org/fresh/0.2.0[/url]
npm http 304 [url=https://registry.npmjs.org/pause/0.0.1]https://registry.npmjs.org/pause/0.0.1[/url]
npm http 304 [url=https://registry.npmjs.org/formidable/1.0.14]https://registry.npmjs.org/formidable/1.0.14[/url]
npm http 304 [url=https://registry.npmjs.org/uid2/0.0.2]https://registry.npmjs.org/uid2/0.0.2[/url]
npm http 304 [url=https://registry.npmjs.org/debug]https://registry.npmjs.org/debug[/url]
npm http 304 [url=https://registry.npmjs.org/methods/0.0.1]https://registry.npmjs.org/methods/0.0.1[/url]
npm http GET [url=https://registry.npmjs.org/range-parser/0.0.4]https://registry.npmjs.org/range-parser/0.0.4[/url]
npm http GET [url=https://registry.npmjs.org/i]https://registry.npmjs.org/i[/url]
npm http GET [url=https://registry.npmjs.org/mkdirp]https://registry.npmjs.org/mkdirp[/url]
npm http GET [url=https://registry.npmjs.org/deep-equal]https://registry.npmjs.org/deep-equal[/url]
npm http GET [url=https://registry.npmjs.org/ncp]https://registry.npmjs.org/ncp[/url]
npm http GET [url=https://registry.npmjs.org/async]https://registry.npmjs.org/async[/url]
npm http 304 [url=https://registry.npmjs.org/range-parser/0.0.4]https://registry.npmjs.org/range-parser/0.0.4[/url]
npm http 304 [url=https://registry.npmjs.org/deep-equal]https://registry.npmjs.org/deep-equal[/url]
npm http 304 [url=https://registry.npmjs.org/ncp]https://registry.npmjs.org/ncp[/url]
npm http 304 [url=https://registry.npmjs.org/async]https://registry.npmjs.org/async[/url]
npm http GET [url=https://registry.npmjs.org/dequeue/1.0.3]https://registry.npmjs.org/dequeue/1.0.3[/url]
npm http GET [url=https://registry.npmjs.org/async/0.1.15]https://registry.npmjs.org/async/0.1.15[/url]
npm http GET [url=https://registry.npmjs.org/semver]https://registry.npmjs.org/semver[/url]
npm http 304 [url=https://registry.npmjs.org/mkdirp]https://registry.npmjs.org/mkdirp[/url]
npm http 304 [url=https://registry.npmjs.org/i]https://registry.npmjs.org/i[/url]
npm http GET [url=https://registry.npmjs.org/readable-stream]https://registry.npmjs.org/readable-stream[/url]
npm http 304 [url=https://registry.npmjs.org/dequeue/1.0.3]https://registry.npmjs.org/dequeue/1.0.3[/url]
npm http 304 [url=https://registry.npmjs.org/async/0.1.15]https://registry.npmjs.org/async/0.1.15[/url]
npm http 304 [url=https://registry.npmjs.org/readable-stream]https://registry.npmjs.org/readable-stream[/url]
npm http 304 [url=https://registry.npmjs.org/semver]https://registry.npmjs.org/semver[/url]
npm http GET [url=https://registry.npmjs.org/xmlhttprequest/1.4.2]https://registry.npmjs.org/xmlhttprequest/1.4.2[/url]
npm http GET [url=https://registry.npmjs.org/uglify-js/1.2.5]https://registry.npmjs.org/uglify-js/1.2.5[/url]
npm http GET [url=https://registry.npmjs.org/ws]https://registry.npmjs.org/ws[/url]
npm http GET [url=https://registry.npmjs.org/active-x-obfuscator/0.0.1]https://registry.npmjs.org/act ... 0.0.1[/url]
npm http 304 [url=https://registry.npmjs.org/xmlhttprequest/1.4.2]https://registry.npmjs.org/xmlhttprequest/1.4.2[/url]
npm http 304 [url=https://registry.npmjs.org/uglify-js/1.2.5]https://registry.npmjs.org/uglify-js/1.2.5[/url]
npm http 304 [url=https://registry.npmjs.org/active-x-obfuscator/0.0.1]https://registry.npmjs.org/act ... 0.0.1[/url]
npm http 304 [url=https://registry.npmjs.org/ws]https://registry.npmjs.org/ws[/url]
npm http GET [url=https://registry.npmjs.org/zeparser/0.0.5]https://registry.npmjs.org/zeparser/0.0.5[/url]
npm http 304 [url=https://registry.npmjs.org/zeparser/0.0.5]https://registry.npmjs.org/zeparser/0.0.5[/url]
npm http GET [url=https://registry.npmjs.org/tinycolor]https://registry.npmjs.org/tinycolor[/url]
npm http GET [url=https://registry.npmjs.org/commander]https://registry.npmjs.org/commander[/url]
npm http GET [url=https://registry.npmjs.org/nan]https://registry.npmjs.org/nan[/url]
npm http GET [url=https://registry.npmjs.org/options]https://registry.npmjs.org/options[/url]
npm http 304 [url=https://registry.npmjs.org/nan]https://registry.npmjs.org/nan[/url]
npm http 304 [url=https://registry.npmjs.org/options]https://registry.npmjs.org/options[/url]
npm http 304 [url=https://registry.npmjs.org/commander]https://registry.npmjs.org/commander[/url]
npm http 304 [url=https://registry.npmjs.org/tinycolor]https://registry.npmjs.org/tinycolor[/url]

> ws@0.4.30 install C:\Users\Travis\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io
-client\node_modules\ws
> /node-gyp rebuild 2> builderror.log/ || /exit 0/


C:\Users\Travis\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules
\ws>node "C:\Program Files /x86/\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js"
rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Users\Travis\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_module
s\ws\build\bufferutil.vcxproj/18,3/: error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found
. Confirm that the path in the <import> declaration is correct, and that the file exists on disk.
C:\Users\Travis\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_module
s\ws\build\validation.vcxproj/18,3/: error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found
. Confirm that the path in the <import> declaration is correct, and that the file exists on disk.
C:\Users\Travis\AppData\Roaming\npm\karma -&gt; C:\Users\Travis\AppData\Roaming\npm\node_modules\karma\bin\karma
karma@0.10.2 C:\Users\Travis\AppData\Roaming\npm\node_modules\karma
├── di@0.0.1
├── rimraf@2.1.4
├── colors@0.6.0-1
├── graceful-fs@1.2.3
├── mime@1.2.11
├── chokidar@0.6.3
├── q@0.9.7
├── coffee-script@1.6.3
├── minimatch@0.2.12 /sigmund@1.0.0, lru-cache@2.3.1/
├── glob@3.1.21 /inherits@1.0.0/
├── optimist@0.3.7 /wordwrap@0.0.2/
├── lodash@1.1.1
├── useragent@2.0.7 /lru-cache@2.2.4/
├── connect@2.8.8 /methods@0.0.1, uid2@0.0.2, cookie-signature@1.0.1, pause@0.0.1, fresh@0.2.0, bytes@0.2.0, qs@0.6.5, b
uffer-crc32@0.2.1, cookie@0.1.0, debug@0.7.2, formidable@1.0.14, send@0.1.4/
├── http-proxy@0.10.3 /pkginfo@0.2.3, utile@0.1.7/
├── log4js@0.6.8 /dequeue@1.0.3, semver@1.1.4, async@0.1.15, readable-stream@1.0.17/
└── socket.io@0.9.16 /base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.16/


它看起来像版本 MSBuild, 这是工作 /在我心里, 12.0/, 错误地解析了变量
$/VCTargetsPath/

在文件中
vcxproj

.
</import></import>
已邀请:

冰洋

赞同来自:

对于那些仍然面临错误的人



安装 VS 从 Windows SDK



解决方案尝试 Besrl, 特别是
node-gyp

failing with


Error MSB4019: The imported project "X:\Microsoft.Cpp.Default.props" was not found

,

尝试运行命令
npm install

来自命令行 MSVS.

找到它
Start menu

>
Microsoft Visual Studio 201X

>
Visual Studio Tools

>
Open Visual Studio 201X Tools Command Prompt

或者跑步
<program files="">\<vs dir="">\Common7\Tools\VsDevCmd.bat

来自命令行。

前面为我工作了 VS2012, 和
https://github.com/TooTallNate ... 84651
Github 帮助我找到它。
</vs></program>

詹大官人

赞同来自:

安装后,我对其他模块有同样的问题 VS Express 2013 为了 web 随着 VS Express 2012 为了 Windows.
决定是建立 VS 2013 为了 Windows 并使用开关


npm install --msvs_version=2013

莫问

赞同来自:

确保您拥有所有必要的软件来运行
node-gyp

:

https://github.com/TooTallNate/node-gyp
您可以自定义版本 Visual Studio, 用过的
gyp

, 使用环境变量来避免设置属性的需要。
--msvs_version=2012

对于未来的安装。

例子:


GYP_MSVS_VERSION=2012

为了 Visual Studio 2012


GYP_MSVS_VERSION=2013e

/'e' 方法 'express edition'/

全部列表见
-
https://github.com/joyent/node ... 9-294
它仍然是痛苦的 Windows 用户 NodeJS, 因为它假定你有副本 Python 和 Visual Studio, 但许多最终用户永远不会。 所以我游说 Joyent, 鼓励他们在节点中包含网套 CORE, 以及发送编译器 GNU gcc 安装 NodeJS, 这样我们就可以永远决定这个问题。

随意添加您的声音:

https://github.com/joyent/node ... 45326

三叔

赞同来自:

在 windows 我发现修复它的最简单方法, - 安装它 windows-build-tools, 如推荐 README 为了 node-gyd


npm install --global --production windows-build-tools


https://github.com/nodejs/node-gyp
所以我没有使用安装时弄乱 python 或其他包裹 dist.

涵秋

赞同来自:

如果您还没有安装 Visual Studio, 然后你肯定需要一个答案

.

主要是您需要安装某种版本 Visual Studio 2010 /快递版本是免费的/, 然后 Windows SDK, 然后 VS SP1, 然后更新编译器 VC++, 一切都在这个顺序。 之后,这个问题应该消失 /至于我。/

要回复问题请先登录注册