****当我尝试安装connect-mongo或connect-mongo@0.4.1我收到此错误,当我尝试安装快递或其他功能时,我从未收到此错误,我可以做些什么来避免这个错误。
在此之前我安装了 1.express 2.hogan快车 3.cookie分析器 4.express会话 为了将我的生产会话与数据库连接起来,我尝试了connect-mongo以及mongoose。两者都显示了与此相同的错误。
有关信息:我已经尝试安装第一个和第二个选项但是没有安装,我已经在我的操作系统中升级了版本。
我无法在此处附加我的图片,因此我从命令提示符
复制粘贴内容 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)
感谢您的努力, 提前谢谢。****
答案 0 :(得分:1)
完成上述日志中提到的这三个步骤,您将会很高兴。