当前位置: 首页 > 面试题库 >

npm install -g karma错误MSB4019:找不到导入的项目“ C:\ Microsoft.Cpp.Default.props”

宓昂雄
2023-03-14
问题内容

我一直在研究AngularJS并遵循其安装步骤,但是运行步骤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 https://registry.npmjs.org/karma
npm http 304 https://registry.npmjs.org/karma
npm http GET https://registry.npmjs.org/di
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/chokidar
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/http-proxy
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/useragent
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/log4js
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/di
npm http 304 https://registry.npmjs.org/chokidar
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/colors/0.6.0-1
npm http 304 https://registry.npmjs.org/http-proxy
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/useragent
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/log4js
npm http 304 https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/connect
npm http 304 https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/socket.io-client/0.9.16
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/base64id/0.1.0
npm http GET https://registry.npmjs.org/redis/0.7.3
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/base64id/0.1.0
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/redis/0.7.3
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.16
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/utile
npm http GET https://registry.npmjs.org/qs/0.6.5
npm http GET https://registry.npmjs.org/cookie-signature/1.0.1
npm http GET https://registry.npmjs.org/formidable/1.0.14
npm http GET https://registry.npmjs.org/cookie/0.1.0
npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1
npm http GET https://registry.npmjs.org/send/0.1.4
npm http GET https://registry.npmjs.org/bytes/0.2.0
npm http GET https://registry.npmjs.org/fresh/0.2.0
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/uid2/0.0.2
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http 304 https://registry.npmjs.org/pkginfo
npm http 304 https://registry.npmjs.org/utile
npm http 304 https://registry.npmjs.org/qs/0.6.5
npm http 304 https://registry.npmjs.org/cookie/0.1.0
npm http 304 https://registry.npmjs.org/cookie-signature/1.0.1
npm http 304 https://registry.npmjs.org/buffer-crc32/0.2.1
npm http 304 https://registry.npmjs.org/send/0.1.4
npm http 304 https://registry.npmjs.org/bytes/0.2.0
npm http 304 https://registry.npmjs.org/fresh/0.2.0
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/formidable/1.0.14
npm http 304 https://registry.npmjs.org/uid2/0.0.2
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/i
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/ncp
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/deep-equal
npm http 304 https://registry.npmjs.org/ncp
npm http 304 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/dequeue/1.0.3
npm http GET https://registry.npmjs.org/async/0.1.15
npm http GET https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/i
npm http GET https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/dequeue/1.0.3
npm http 304 https://registry.npmjs.org/async/0.1.15
npm http 304 https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/tinycolor

> 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 -> 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


问题答案:

在将VS Express 2013 for Web和VS Express 2012 for
Windows一起安装后,其他模块也遇到了相同的问题。解决方案是为Windows安装VS 2013并使用开关

npm install --msvs_version=2013


 类似资料:
  • 这是我第一次使用gradle,我正在尝试将gradle项目导入Eclipse。 EclipseJavaWeb开发人员的EE IDE。版本:光子发布(4.8.0)构建id:20180619-1200操作系统: Windows 10, v.10.0,x86_64/win32Java版本: 1.8.0_181 使用导入“现有Gradle项目”。。我在电脑上出错了 org.gradle.tooling.构

  • null null 我已经搜索了一些这些错误,有些人说删除“.settings”和“.project”文件可以消除这些错误,但这对我不起作用。 什么可能导致这些错误?有没有解决方法?

  • 问题内容: 我正在尝试“将现有项目导入工作区”。作为“根目录”,我选择所有.java(和.class)文件所在的目录。Eclipse告诉我“未找到要导入的项目”。为什么? 问题答案: Eclipse正在寻找eclipse项目,这意味着它正在根目录(和)中搜索特定于Eclipse的文件。您或者给了Eclipse错误的目录(如果要导入一个eclipse项目),或者您实际上想从现有源创建一个新项目(->

  • 我在Android Studio中导入了一个现有的Android项目,但它没有构建,因为: 我如何解决这个问题?项目在Eclipse中构建,所以我不知道为什么会发生这种情况。 我看过这个,但是我不知道它和Android Studio有什么关系。

  • 我试着构建应用程序,但一直在获取/Users/gouravkarwasara/Desktop/News2/app/build/generated/source/kapt/debug/com/gourav/news/DataBinderMapperImpl。java:9:错误:找不到符号导入com。古拉夫。消息数据绑定。ActivityDetailBindingImpl;^符号:类ActivityD

  • 我已将google AdMob添加到项目中,并发现以下错误:错误:找不到符号导入com。谷歌。Androidgms。ads.alad;^符号:class Interstitalad位置:package com。谷歌。Androidgms。广告