0

****connect-mongo または connect-mongo@0.4.1 をインストールしようとすると、このエラーが発生します。エクスプレスまたはその他の機能をインストールしようとすると、このエラーは発生しませんでした。このエラーを回避するためにできること.

この前に、1.express 2.hogan-express 3.cookie-parser 4.express-session をインストールしました。本番セッションをデータベースに接続するために、connect-mongo と mongoose を試しました。どちらもこれと同じエラーを示します。

情報: すでに 1 番目と 2 番目のオプションをインストールしようとしましたが、インストールされません。OS のバージョンを既にアップグレードしています。

ここに画像を添付できなかったので、コマンドプロンプトからコンテンツをコピーして貼り付けました

    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)

よろしくお願いいたします。****

4

1 に答える 1

1

上記のログに記載されているように、これらの 3 つの手順を完了すると、準備完了です。

  1. .NET Framework 2.0 SDK をインストールし、
  2. Microsoft Visual Studio 2005 をインストールするか、
  3. コンポーネントが別の場所にインストールされている場合は、コンポーネントの場所をシステム パスに追加します。
于 2015-09-06T13:47:12.433 に答える