简体   繁体   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)

Guess this has something to do something with MS visual studio, or may be not. 猜猜这与MS Visual Studio有什么关系,也许没有。

C:\\user_management>npm install mongodb 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)

Any suggestions on this, much appreciated! 任何建议,不胜感激!

The answer is here , only you need set environment variable VCTargetsPath to correct folder for file Microsoft.Cpp.Default.props me is here C:\\Program Files (x86)\\MSBuild\\Microsoft.Cpp\\v4.0\\V120. 答案是在这里 ,只有您需要设置环境变量VCTargetsPath来更正文件Microsoft.Cpp.Default.props的文件夹,这里是C:\\ Program Files(x86)\\ MSBuild \\ Microsoft.Cpp \\ v4.0 \\ V120。 Good luck! 祝好运!

暂无
暂无

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

相关问题 在Windows 7上安装节点模块时出现错误 - I am getting error while installing node modules on windows 7 我正在 docker 中运行一个 mongodb 实例。 如何获取连接字符串以在我的 nodejs 应用程序中与 RoboT3 或 mongoose 一起使用? - I am running an instance of mongodb in docker. How do I get the connection string to use it with RoboT3 or mongoose in my nodejs application? 在OSX上安装Node时遇到这些错误,我缺少什么? - What am I missing when getting these errors installing Node on OSX? 我可以在nodeJs-mongoDb驱动程序中访问mongoDB控制台吗 - can i access mongoDB console in nodeJs-mongoDb driver 如何让在 docker 下运行的 nodejs 服务器通过 mongoose 连接到 mongodb? - How can I get a nodejs server running under docker get connected by mongoose to mongodb? Mongodb节点驱动程序-当我调用db.close()真的很重要吗?还是我很幸运? - Mongodb Node Driver - does it really matter when I call db.close() or am I getting lucky? 我收到 npm i 和 node_modules 错误 - I am getting errors with npm i, and node_modules 为什么我在这个 nodejs 天气应用程序的控制台中收到这些错误? - Why am I getting these errors in my console on this nodejs weather app? 当我的计算机上安装了 mongoDB 时,是否需要安装 nodejs mongodb 驱动程序才能在节点应用程序中使用? - Do I need to install nodejs mongodb driver to use in node apps when I have mongoDB installed on my computer? 为什么在控制台中打印猫鼬的模型对象时会看到额外的字段。 我正在使用带有猫鼬的节点 JS。 我怎样才能隐藏这些属性 - Why I am seeing extra fields when printing the model object of mongoose in console . I am using node JS with mongoose. How can i hide these attribute
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM