繁体   English   中英

我在Windows 7上运行nodejs,安装节点模块(mongodb驱动程序,mongoose等)时出现以下错误:

[英]I am running nodejs on windows 7 and I get below errors in the console when installing node modules (mongodb driver, mongoose etc)

猜猜这与MS Visual Studio有什么关系,也许没有。

C:\\ user_management> npm安装mongodb

> kerberos@0.0.12 install C:\user_management\node_modules\mongodb\node_modules\m
ongodb-core\node_modules\kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)

C:\user_management\node_modules\mongodb\node_modules\mongodb-core\node_modules\k
erberos>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\n
ode_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:\user_management\node_modules\mongodb\node_modules\mongodb-core\node_modules\
kerberos\build\kerberos.vcxproj(18,3): error MSB4019: The imported project "C:\
Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Impor
t> declaration is correct, and that the file exists on disk.

mongodb@2.0.39 node_modules\mongodb<br>
├── readable-stream@1.0.31 (isarray@0.0.1, inherits@2.0.1, core-util-is@1.0.1, s
tring_decoder@0.10.31)<br>
├── es6-promise@2.1.1<br>
└── mongodb-core@1.2.6 (bson@0.4.8, kerberos@0.0.12)

任何建议,不胜感激!

答案是在这里 ,只有您需要设置环境变量VCTargetsPath来更正文件Microsoft.Cpp.Default.props的文件夹,这里是C:\\ Program Files(x86)\\ MSBuild \\ Microsoft.Cpp \\ v4.0 \\ V120。 祝好运!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM