簡體   English   中英

安裝MongoDB時出現SailsJS錯誤(windows 8 x64)

[英]SailsJS error installing MongoDB (windows 8 x64)

目前我的系統中安裝了一個MongoDB,它與我的PHP項目配合得很好。 但是,當我為sailsjs安裝mongodb適配器時,它給了我一個錯誤

gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-G', gyp info spawn args 'msvs_version=2012', gyp info spawn args '-I', gyp info spawn args 'C:\\\\web\\\\app\\\\build\\\\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\\\\Users\\\\Rusty Orange\\\\AppData\\\\Roaming\\\\npm\\\\node_modu les\\\\node-gyp\\\\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\\\\Users\\\\Rusty Orange\\\\.node-gyp\\\\0.10.25\\\\common.gypi' , gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\\\\Users\\\\Rusty Orange\\\\.node-gyp\\\\0.10. 25', gyp info spawn args '-Dmodule_root_dir=C:\\\\web\\\\app', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'C:\\\\web\\\\app\\\\build', gyp info spawn args '-Goutput_dir=.' ] gyp: binding.gyp not found (cwd: C:\\web\\app) while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-G', gyp info spawn args 'msvs_version=2012', gyp info spawn args '-I', gyp info spawn args 'C:\\\\web\\\\app\\\\build\\\\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\\\\Users\\\\Rusty Orange\\\\AppData\\\\Roaming\\\\npm\\\\node_modu les\\\\node-gyp\\\\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\\\\Users\\\\Rusty Orange\\\\.node-gyp\\\\0.10.25\\\\common.gypi' , gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\\\\Users\\\\Rusty Orange\\\\.node-gyp\\\\0.10. 25', gyp info spawn args '-Dmodule_root_dir=C:\\\\web\\\\app', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'C:\\\\web\\\\app\\\\build', gyp info spawn args '-Goutput_dir=.' ] gyp: binding.gyp not found (cwd: C:\\web\\app) while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp`失敗,退出代碼:1 gyp ERR! 在ChildProcess.onCpExit堆棧(C:\\ Users \\ Rusty Orange \\ AppData \\ Roami ng \\ npm \\ node_modules \\ node-gyp \\ lib \\ configure.js:343:16)gyp ERR! 堆棧在ChildProcess.EventEmitter.emit(events.js:98:17)gyp ERR! 在Process.ChildProcess._handle.onexit(child_process.js:797:12)的堆棧gyp ERR! 系統Windows_NT 6.2.9200 gyp ERR! 命令“node”“C:\\ Users \\ Rusty Orange \\ AppData \\ Roaming \\ npm \\ node_mo dules \\ node-gyp \\ bin \\ node-gyp.js”“rebuild”“ - msvs_version = 2012”gyp ERR! cwd C:\\ web \\ app gyp ERR! node -v v0.10.25 gyp ERR! node-gyp -v v1.0.2 gyp ERR! 不好

    C:\web\app>npm install sails-mongo -msvs_version=2012
    npm http GET https://registry.npmjs.org/sails-mongo
    npm http 304 https://registry.npmjs.org/sails-mongo
    npm http GET https://registry.npmjs.org/waterline-errors
    npm http GET https://registry.npmjs.org/mongodb/1.4.4
    npm http GET https://registry.npmjs.org/waterline-cursor
    npm http GET https://registry.npmjs.org/async
    npm http GET https://registry.npmjs.org/lodash
    npm http 304 https://registry.npmjs.org/lodash
    npm http 304 https://registry.npmjs.org/async
    npm http 304 https://registry.npmjs.org/waterline-cursor
    npm http 304 https://registry.npmjs.org/mongodb/1.4.4
    npm http 304 https://registry.npmjs.org/waterline-errors
    npm http GET https://registry.npmjs.org/kerberos/0.0.3
    npm http GET https://registry.npmjs.org/bson/0.2.8
    npm http 304 https://registry.npmjs.org/kerberos/0.0.3
    npm http 304 https://registry.npmjs.org/bson/0.2.8

    > kerberos@0.0.3 install C:\web\app\node_modules\sails-mongo\node_modules\mongod
    b\node_modules\kerberos
    > (node-gyp rebuild 2> builderror.log) || (exit 0)


    C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node_modules\kerberos>n
    ode "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modul
    es\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:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.t
    argets(64,5): error MSB8020: The build tools for Visual Studio 2012 (Platform T
    oolset = 'v110') cannot be found. To build using the v110 build tools, please i
    nstall Visual Studio 2012 build tools.  Alternatively, you may upgrade to the c
    urrent Visual Studio tools by selecting the Project menu or right-click the sol
    ution, and then selecting "Upgrade Solution...". [C:\web\app\node_modules\sails
    -mongo\node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
    npm http GET https://registry.npmjs.org/nan
    npm http 304 https://registry.npmjs.org/nan

    > bson@0.2.8 install C:\web\app\node_modules\sails-mongo\node_modules\mongodb\no
    de_modules\bson
    > (node-gyp rebuild 2> builderror.log) || (exit 0)


    C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node_modules\bson>node
    "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\n
    ode-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:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.t
    argets(64,5): error MSB8020: The build tools for Visual Studio 2012 (Platform T
    oolset = 'v110') cannot be found. To build using the v110 build tools, please i
    nstall Visual Studio 2012 build tools.  Alternatively, you may upgrade to the c
    urrent Visual Studio tools by selecting the Project menu or right-click the sol
    ution, and then selecting "Upgrade Solution...". [C:\web\app\node_modules\sails
    -mongo\node_modules\mongodb\node_modules\bson\build\bson.vcxproj]
    sails-mongo@0.10.4 node_modules\sails-mongo
    ├── waterline-errors@0.10.0-rc1
    ├── async@0.8.0
    ├── waterline-cursor@0.0.5 (async@0.9.0)
    ├── lodash@2.4.1
    └── mongodb@1.4.4 (kerberos@0.0.3, bson@0.2.8)

    C:\web\app>npm install sails-mongo --save
    npm http GET https://registry.npmjs.org/sails-mongo
    npm http 304 https://registry.npmjs.org/sails-mongo
    npm http GET https://registry.npmjs.org/mongodb/1.4.4
    npm http GET https://registry.npmjs.org/async
    npm http GET https://registry.npmjs.org/waterline-cursor
    npm http GET https://registry.npmjs.org/lodash
    npm http GET https://registry.npmjs.org/waterline-errors
    npm http 304 https://registry.npmjs.org/waterline-errors
    npm http 304 https://registry.npmjs.org/mongodb/1.4.4
    npm http 304 https://registry.npmjs.org/waterline-cursor
    npm http 304 https://registry.npmjs.org/async
    npm http 304 https://registry.npmjs.org/lodash
    npm http GET https://registry.npmjs.org/bson/0.2.8
    npm http GET https://registry.npmjs.org/kerberos/0.0.3
    npm http 304 https://registry.npmjs.org/bson/0.2.8
    npm http 304 https://registry.npmjs.org/kerberos/0.0.3

    > kerberos@0.0.3 install C:\web\app\node_modules\sails-mongo\node_modules\mongod
    b\node_modules\kerberos
    > (node-gyp rebuild 2> builderror.log) || (exit 0)


    C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node_modules\kerberos>n
    ode "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modul
    es\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.
      kerberos.cc
      worker.cc
      security_credentials.cc
      security_buffer.cc
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C450
    6: no definition for inline function 'v8::Persistent<v8::Object> v8::Persistent
    <v8::Object>::New(v8::Handle<v8::Object>)' (..\lib\win32\worker.cc) [C:\web\app
    \node_modules\sails-mongo\node_modules\mongodb\node_modules\kerberos\build\kerb
    eros.vcxproj]
      security_buffer_descriptor.cc
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(184): warning C450
    6: no definition for inline function 'v8::Persistent<v8::Object> v8::Persistent
    <v8::Object>::New(v8::Handle<v8::Object>)' (..\lib\win32\kerberos.cc) [C:\web\a
    pp\node_modules\sails-mongo\node_modules\mongodb\node_modules\kerberos\build\ke
    rberos.vcxproj]
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(184): warning C450
    6: no definition for inline function 'v8::Persistent<v8::FunctionTemplate> v8::
    Persistent<v8::FunctionTemplate>::New(v8::Handle<v8::FunctionTemplate>)' (..\li
    b\win32\kerberos.cc) [C:\web\app\node_modules\sails-mongo\node_modules\mongodb\
    node_modules\kerberos\build\kerberos.vcxproj]
      security_context.cc
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): wa
    rning C4530: C++ exception handler used, but unwind semantics are not enabled.
    Specify /EHsc (..\lib\win32\wrappers\security_buffer.cc) [C:\web\app\node_modul
    es\sails-mongo\node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxpro
    j]
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): wa
    rning C4530: C++ exception handler used, but unwind semantics are not enabled.
    Specify /EHsc (..\lib\win32\wrappers\security_credentials.cc) [C:\web\app\node_
    modules\sails-mongo\node_modules\mongodb\node_modules\kerberos\build\kerberos.v
    cxproj]
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(218): warning C450
    6: no definition for inline function 'v8::Persistent<v8::Object> v8::Persistent
    <v8::Object>::New(v8::Handle<v8::Object>)' (..\lib\win32\wrappers\security_buff
    er.cc) [C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node_modules\k
    erberos\build\kerberos.vcxproj]
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(218): warning C450
    6: no definition for inline function 'v8::Persistent<v8::FunctionTemplate> v8::
    Persistent<v8::FunctionTemplate>::New(v8::Handle<v8::FunctionTemplate>)' (..\li
    b\win32\wrappers\security_buffer.cc) [C:\web\app\node_modules\sails-mongo\node_
    modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): wa
    rning C4530: C++ exception handler used, but unwind semantics are not enabled.
    Specify /EHsc (..\lib\win32\wrappers\security_buffer_descriptor.cc) [C:\web\app
    \node_modules\sails-mongo\node_modules\mongodb\node_modules\kerberos\build\kerb
    eros.vcxproj]
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): wa
    rning C4530: C++ exception handler used, but unwind semantics are not enabled.
    Specify /EHsc (..\lib\win32\wrappers\security_context.cc) [C:\web\app\node_modu
    les\sails-mongo\node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxpr
    oj]
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C450
    6: no definition for inline function 'v8::Persistent<v8::Object> v8::Persistent
    <v8::Object>::New(v8::Handle<v8::Object>)' (..\lib\win32\wrappers\security_cred
    entials.cc) [C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node_modu
    les\kerberos\build\kerberos.vcxproj]
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C450
    6: no definition for inline function 'v8::Persistent<v8::FunctionTemplate> v8::
    Persistent<v8::FunctionTemplate>::New(v8::Handle<v8::FunctionTemplate>)' (..\li
    b\win32\wrappers\security_credentials.cc) [C:\web\app\node_modules\sails-mongo\
    node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(218): warning C450
    6: no definition for inline function 'v8::Persistent<v8::Object> v8::Persistent
    <v8::Object>::New(v8::Handle<v8::Object>)' (..\lib\win32\wrappers\security_buff
    er_descriptor.cc) [C:\web\app\node_modules\sails-mongo\node_modules\mongodb\nod
    e_modules\kerberos\build\kerberos.vcxproj]
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(218): warning C450
    6: no definition for inline function 'v8::Persistent<v8::FunctionTemplate> v8::
    Persistent<v8::FunctionTemplate>::New(v8::Handle<v8::FunctionTemplate>)' (..\li
    b\win32\wrappers\security_buffer_descriptor.cc) [C:\web\app\node_modules\sails-
    mongo\node_modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C450
    6: no definition for inline function 'v8::Persistent<v8::Object> v8::Persistent
    <v8::Object>::New(v8::Handle<v8::Object>)' (..\lib\win32\wrappers\security_cont
    ext.cc) [C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node_modules\
    kerberos\build\kerberos.vcxproj]
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C450
    6: no definition for inline function 'v8::Persistent<v8::FunctionTemplate> v8::
    Persistent<v8::FunctionTemplate>::New(v8::Handle<v8::FunctionTemplate>)' (..\li
    b\win32\wrappers\security_context.cc) [C:\web\app\node_modules\sails-mongo\node
    _modules\mongodb\node_modules\kerberos\build\kerberos.vcxproj]
      kerberos_sspi.c
      base64.c
         Creating library C:\web\app\node_modules\sails-mongo\node_modules\mongodb\
      node_modules\kerberos\build\Release\kerberos.lib and object C:\web\app\node_m
      odules\sails-mongo\node_modules\mongodb\node_modules\kerberos\build\Release\k
      erberos.exp
      Generating code
      Finished generating code
      kerberos.vcxproj -> C:\web\app\node_modules\sails-mongo\node_modules\mongodb\
      node_modules\kerberos\build\Release\\kerberos.node
    npm http GET https://registry.npmjs.org/nan
    npm http 304 https://registry.npmjs.org/nan

    > bson@0.2.8 install C:\web\app\node_modules\sails-mongo\node_modules\mongodb\no
    de_modules\bson
    > (node-gyp rebuild 2> builderror.log) || (exit 0)


    C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node_modules\bson>node
    "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\n
    ode-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.
      bson.cc
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): wa
    rning C4530: C++ exception handler used, but unwind semantics are not enabled.
    Specify /EHsc [C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node_mo
    dules\bson\build\bson.vcxproj]
    C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node_modules\bson\node
    _modules\nan\nan.h(1103): warning C4267: 'initializing' : conversion from 'size
    _t' to 'int', possible loss of data [C:\web\app\node_modules\sails-mongo\node_m
    odules\mongodb\node_modules\bson\build\bson.vcxproj]
    C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node_modules\bson\node
    _modules\nan\nan.h(1117): warning C4267: 'initializing' : conversion from 'size
    _t' to 'int', possible loss of data [C:\web\app\node_modules\sails-mongo\node_m
    odules\mongodb\node_modules\bson\build\bson.vcxproj]
    ..\ext\bson.cc(891): warning C4267: 'argument' : conversion from 'size_t' to 'u
    int32_t', possible loss of data [C:\web\app\node_modules\sails-mongo\node_modul
    es\mongodb\node_modules\bson\build\bson.vcxproj]
    C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node_modules\bson\node
    _modules\nan\nan.h(950): warning C4244: 'argument' : conversion from 'int64_t'
    to 'double', possible loss of data [C:\web\app\node_modules\sails-mongo\node_mo
    dules\mongodb\node_modules\bson\build\bson.vcxproj]
              ..\ext\bson.cc(560) : see reference to function template instantiatio
      n 'v8::Local<v8::Number> NanNew<v8::Number,int64_t>(P)' being compiled
              with
              [
                  P=int64_t
              ]
    ..\ext\bson.cc(313): warning C4267: 'initializing' : conversion from 'size_t' t
    o 'uint32_t', possible loss of data [C:\web\app\node_modules\sails-mongo\node_m
    odules\mongodb\node_modules\bson\build\bson.vcxproj]
              ..\ext\bson.cc(142) : while compiling class template member function
      'void BSONSerializer<CountStream>::SerializeValue(void *,const v8::Handle<v8:
      :Value> &)'
              ..\ext\bson.cc(112) : see reference to function template instantiatio
      n 'void BSONSerializer<CountStream>::SerializeValue(void *,const v8::Handle<v
      8::Value> &)' being compiled
              ..\ext\bson.cc(92) : while compiling class template member function '
      void BSONSerializer<CountStream>::SerializeDocument(const v8::Handle<v8::Valu
      e> &)'
              ..\ext\bson.cc(869) : see reference to function template instantiatio
      n 'void BSONSerializer<CountStream>::SerializeDocument(const v8::Handle<v8::V
      alue> &)' being compiled
              ..\ext\bson.cc(868) : see reference to class template instantiation '
      BSONSerializer<CountStream>' being compiled
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C450
    6: no definition for inline function 'v8::Persistent<v8::Object> v8::Persistent
    <v8::Object>::New(v8::Handle<v8::Object>)' [C:\web\app\node_modules\sails-mongo
    \node_modules\mongodb\node_modules\bson\build\bson.vcxproj]
    C:\Users\Rusty Orange\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C450
    6: no definition for inline function 'v8::Persistent<v8::FunctionTemplate> v8::
    Persistent<v8::FunctionTemplate>::New(v8::Handle<v8::FunctionTemplate>)' [C:\we
    b\app\node_modules\sails-mongo\node_modules\mongodb\node_modules\bson\build\bso
    n.vcxproj]
         Creating library C:\web\app\node_modules\sails-mongo\node_modules\mongodb\
      node_modules\bson\build\Release\bson.lib and object C:\web\app\node_modules\s
      ails-mongo\node_modules\mongodb\node_modules\bson\build\Release\bson.exp
      Generating code
      Finished generating code
      bson.vcxproj -> C:\web\app\node_modules\sails-mongo\node_modules\mongodb\node
      _modules\bson\build\Release\\bson.node
    sails-mongo@0.10.4 node_modules\sails-mongo
    ├── waterline-errors@0.10.0-rc1
    ├── async@0.8.0
    ├── waterline-cursor@0.0.5 (async@0.9.0)
    ├── lodash@2.4.1
    └── mongodb@1.4.4 (kerberos@0.0.3, bson@0.2.8)

    C:\web\app>`

它與Visual Studio有沖突嗎? 還是我錯過了什么?

您在系統上安裝了哪個版本的nodejs。這是使sailjs版本與nodejs版本發生沖突時的錯誤。

檢查所有依賴項,然后您可以繼續。

您可以使用nvm(節點版本管理器)直接更改nodejs的版本。

祝你好運。

不,只是使用nvm更改npm的版本我不是在告訴nodejs軟件版本..

在互聯網上搜索nvm你會明白的

謝謝。

檢查所有依賴項,然后您可以繼續。

您可以使用nvm(節點版本管理器)直接更改nodejs的版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM