首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装connect-mongo时出错

安装connect-mongo时出错
EN

Stack Overflow用户
提问于 2015-09-05 00:59:06
回答 1查看 513关注 0票数 0

*当我尝试安装connect-mongo或connect-mongo@0.4.1时,我得到了这个错误,当我尝试安装express或其他功能时,我从来没有得到这个错误,我可以做些什么来避免这个错误。

在此之前,我安装了1.express、2.hogan-express、3.cookie-parser、4.express-session,为了连接我的生产会话和数据库,我尝试了connect-mongo和mongoose,.Both显示的错误与这个相同。

参考资料:我已经尝试安装第一个和第二个选项它没有安装,我已经在我的操作系统中升级了版本。

我无法在这里附加我的图像,所以我从命令提示符复制粘贴了内容

代码语言:javascript
复制
    C:\Users\Desktop\Chatbox>npm install connect-mongo@0.4.1 --save
    npm WARN package.json chatbox@1.0.0 No repository field.
    npm WARN package.json chatbox@1.0.0 No README data
    |
    > kerberos@0.0.3 install C:\Users\Desktop\Chatbox\node_modules\connect-m
    ongo\node_modules\mongodb\node_modules\kerberos
    > (node-gyp rebuild 2> builderror.log) || (exit 0)

   C:\Users\Desktop\Chatbox\node_modules\connect-mongo\node_modules\mongodb
    \node_modules\kerberos>if not defined npm_config_node_gyp (node "C:\Program File
    s\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node
    -gyp.js" rebuild )  else (node  rebuild )
    Building the projects in this solution one at a time. To enable parallel build,
    please add the "/m" switch.
    MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
     To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
    l Studio 2005 or 3) add the location of the component to the system path if it
    is installed elsewhere.  [C:\Users\Desktop\Chatbox\node_modules\connect
    -mongo\node_modules\mongodb\node_modules\kerberos\build\binding.sln]

    > bson@0.2.5 install C:\Users\Desktop\Chatbox\node_modules\connect-mongo
    \node_modules\mongodb\node_modules\bson
    > (node-gyp rebuild 2> builderror.log) || (exit 0)


    C:\Users\Desktop\Chatbox\node_modules\connect-mongo\node_modules\mongodb
    \node_modules\bson>if not defined npm_config_node_gyp (node "C:\Program Files\no
    dejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp
    .js" rebuild )  else (node  rebuild )
    Building the projects in this solution one at a time. To enable parallel build,
    please add the "/m" switch.
    MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
     To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
    l Studio 2005 or 3) add the location of the component to the system path if it
    is installed elsewhere.  [C:\Users\Desktop\Chatbox\node_modules\connect
    -mongo\node_modules\mongodb\node_modules\bson\build\binding.sln]
    connect-mongo@0.4.1 node_modules\connect-mongo
    └── mongodb@1.3.23 (kerberos@0.0.3, bson@0.2.5)

感谢您的努力,提前谢谢您。*

EN

回答 1

Stack Overflow用户

发布于 2015-09-06 21:47:12

完成上面日志中提到的这三个步骤,您就可以开始了。

  1. 安装MicrosoftFramework2.0SDK,
  2. 安装.NET Visual Studio2005或
  3. 如果组件安装在其他位置,请将其位置添加到系统路径中。
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32403130

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档