[英]Nodejs with Express - Errors when adding mongoDB and mongoose to package.json and running npm install
Windows 8.1 Windows 8.1
Express starting point using Git Bash 使用Git Bash表达起点
Doing an npm install with python 2.7.10 to avoid 3.4 problems 使用python 2.7.10进行npm安装以避免3.4问题
Is there a problem with the C compiler? C编译器有问题吗?
How do I fix it? 我如何解决它?
package.json: 的package.json:
{
"name": "nodeauth",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "~1.13.2",
"cookie-parser": "~1.3.5",
"debug": "~2.2.0",
"express": "~4.13.1",
"jade": "~1.11.0",
"morgan": "~1.6.1",
"serve-favicon": "~2.3.0",
"mongodb": "*",
"mongoose": "*"
}
}
The following log is for inclusion of mongodb and mongoose ... I had similar warnings when just including mongodb: 以下日志包含mongodb和mongoose ......当我只包含mongodb时,我有类似的警告:
$ npm install --python=c:\python27\python - > kerberos@0.0.12 install e:\nodejs\_projects\nodeauth\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos > (node-gyp rebuild 2> builderror.log) || (exit 0) e:\nodejs\_projects\nodeauth\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos>if not defined npm_config_node_gyp (node "c:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (nod e\ 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_buffer.cc security_buffer_descriptor.cc security_context.cc security_credentials.cc C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (..\lib\win32\wrappers\security_buffer.cc) [e:\nodejs\_projects\nodeauth\node_modules\mong odb\node_modules\mongodb-core\node_modules\kerberos\build\kerberos.vcxproj] -C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (..\lib\win32\wrappers\security_context.cc) [e:\nodejs\_projects\nodeauth\node_modules\mon C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (..\lib\win32\wrappers\security_buffer_descriptor.cc) [e:\nodejs\_projects\nodeauth\node_m odules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\kerberos.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (..\lib\win32\wrappers\security_credentials.cc) [e:\nodejs\_projects\nodeauth\node_modules \mongodb\node_modules\mongodb-core\node_modules\kerberos\build\kerberos.vcxproj] base64.c kerberos_sspi.c Creating library e:\nodejs\_projects\nodeauth\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\Relea se\kerberos.lib and object e:\nodejs\_projects\nodeauth\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\buil d\Release\kerberos.exp Generating code Finished generating code kerberos.vcxproj -> e:\nodejs\_projects\nodeauth\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\Relea se\\kerberos.node npm WARN installMany nopt was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree npm WARN installMany npmlog was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree npm WARN installMany request was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree npm WARN installMany semver was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree npm WARN installMany tar was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree npm WARN installMany tar-pack was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree npm WARN installMany mkdirp was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree npm WARN installMany rc was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree npm WARN installMany rimraf was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree > kerberos@0.0.12 install e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\mongodb\node_modules\mongodb-core\node_mod ules\kerberos > (node-gyp rebuild 2> builderror.log) || (exit 0) \ e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos>if not defin ed npm_config_node_gyp (node "c:\Program Files\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. kerberos.cc worker.cc security_buffer.cc security_buffer_descriptor.cc security_context.cc security_credentials.cc C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (..\lib\win32\wrappers\security_buffer.cc) [e:\nodejs\_projects\nodeauth\node_modules\mong oose\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\kerberos.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (..\lib\win32\wrappers\security_buffer_descriptor.cc) [e:\nodejs\_projects\nodeauth\node_m odules\mongoose\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\kerberos.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (..\lib\win32\wrappers\security_context.cc) [e:\nodejs\_projects\nodeauth\node_modules\mon goose\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\kerberos.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc (..\lib\win32\wrappers\security_credentials.cc) [e:\nodejs\_projects\nodeauth\node_modules \mongoose\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\kerberos.vcxproj] base64.c kerberos_sspi.c Creating library e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\mongodb\node_modules\mongodb-core\node_module s\kerberos\build\Release\kerberos.lib and object e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\mongodb\node_mod ules\mongodb-core\node_modules\kerberos\build\Release\kerberos.exp Generating code Finished generating code kerberos.vcxproj -> e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\mongodb\node_modules\mongodb-core\node_module s\kerberos\build\Release\\kerberos.node > bson-ext@0.1.12 install e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext > (node-pre-gyp install --fallback-to-build) || (node-gyp rebuild 2> builderror.log) || (exit 0) e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext>if not defined npm_config_node_gyp (node "c:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node clean ) e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext>if not defined npm_config_node_gyp (node "c:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-bui ld --module=e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext\build\Release\bson.node --mod ule_name=bson --module_path=e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext\build\Release --python=c:python27python ) else (node configure --fallback-to-build --module=e:\nodejs\_projects\nodeauth\node_modules\mongoose\ node_modules\bson\node_modules\bson-ext\build\Release\bson.node --module_name=bson --module_path=e:\nodejs\_projects\nodeauth\node_m odules\mongoose\node_modules\bson\node_modules\bson-ext\build\Release --python=c:python27python ) e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext>if not defined npm_config_node_gyp (node "c:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" build --fallback-to-build - -module=e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext\build\Release\bson.node --module_ name=bson --module_path=e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext\build\Release ) else (node build --fallback-to-build --module=e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bso n-ext\build\Release\bson.node --module_name=bson --module_path=e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\ node_modules\bson-ext\build\Release ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. bson.cc ..\ext\bson.cc(688): warning C4267: 'argument' : conversion from 'size_t' to 'uint32_t', possible loss of data [e:\nodejs\_projects \nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext\build\bson.vcxproj] ..\ext\bson.cc(902): warning C4267: 'argument' : conversion from 'size_t' to 'uint32_t', possible loss of data [e:\nodejs\_projects \nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext\build\bson.vcxproj] e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext\node_modules\nan\nan_new.h(208): warning C4244: 'argument' : conversion from 'int64_t' to 'double', possible loss of data [e:\nodejs\_projects\nodeauth\node_modules\mongoo se\node_modules\bson\node_modules\bson-ext\build\bson.vcxproj] ..\ext\bson.cc(568) : see reference to function template instantiation 'v8::Local NanNew( A0)' being compiled with [ A0=int64_t ] ..\ext\bson.cc(339): warning C4267: 'initializing' : conversion from 'size_t' to 'uint32_t', possible loss of data [e:\nodejs\_proj ects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext\build\bson.vcxproj] ..\ext\bson.cc(153) : while compiling class template member function 'void BSONSerializer::SerializeValue(voi d *,const v8::Handle,bool)' ..\ext\bson.cc(123) : see reference to function template instantiation 'void BSONSerializer::SerializeValue(v oid *,const v8::Handle,bool)' being compiled ..\ext\bson.cc(103) : while compiling class template member function 'void BSONSerializer::SerializeDocument( const v8::Handle &)' ..\ext\bson.cc(879) : see reference to function template instantiation 'void BSONSerializer::SerializeDocumen t(const v8::Handle &)' being compiled ..\ext\bson.cc(878) : see reference to class template instantiation 'BSONSerializer' being compiled win_delay_load_hook.c Creating library e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext\build\Release\bson .lib and object e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext\build\Release\bson.exp Generating code Finished generating code bson.vcxproj -> e:\nodejs\_projects\nodeauth\node_modules\mongoose\node_modules\bson\node_modules\bson-ext\build\Release\\bson.no de cookie-parser@1.3.5 node_modules\cookie-parser ├── cookie-signature@1.0.6 └── cookie@0.1.3 debug@2.2.0 node_modules\debug └── ms@0.7.1 serve-favicon@2.3.0 node_modules\serve-favicon ├── ms@0.7.1 ├── etag@1.7.0 ├── parseurl@1.3.0 └── fresh@0.3.0 morgan@1.6.1 node_modules\morgan ├── basic-auth@1.0.3 ├── on-headers@1.0.0 ├── depd@1.0.1 └── on-finished@2.3.0 (ee-first@1.1.1) body-parser@1.13.3 node_modules\body-parser ├── bytes@2.1.0 ├── content-type@1.0.1 ├── depd@1.0.1 ├── on-finished@2.3.0 (ee-first@1.1.1) ├── qs@4.0.0 ├── raw-body@2.1.2 (unpipe@1.0.0) ├── iconv-lite@0.4.11 ├── http-errors@1.3.1 (inherits@2.0.1, statuses@1.2.1) └── type-is@1.6.6 (media-typer@0.3.0, mime-types@2.1.4) express@4.13.3 node_modules\express ├── escape-html@1.0.2 ├── merge-descriptors@1.0.0 ├── cookie@0.1.3 ├── array-flatten@1.1.1 ├── cookie-signature@1.0.6 ├── fresh@0.3.0 ├── methods@1.1.1 ├── range-parser@1.0.2 ├── vary@1.0.1 ├── etag@1.7.0 ├── content-type@1.0.1 ├── path-to-regexp@0.1.7 ├── utils-merge@1.0.0 ├── parseurl@1.3.0 ├── serve-static@1.10.0 ├── content-disposition@0.5.0 ├── depd@1.0.1 ├── on-finished@2.3.0 (ee-first@1.1.1) ├── finalhandler@0.4.0 (unpipe@1.0.0) ├── qs@4.0.0 ├── proxy-addr@1.0.8 (forwarded@0.1.0, ipaddr.js@1.0.1) ├── send@0.13.0 (destroy@1.0.3, ms@0.7.1, statuses@1.2.1, mime@1.3.4, http-errors@1.3.1) ├── type-is@1.6.6 (media-typer@0.3.0, mime-types@2.1.4) └── accepts@1.2.12 (negotiator@0.5.3, mime-types@2.1.4) jade@1.11.0 node_modules\jade ├── character-parser@1.2.1 ├── void-elements@2.0.1 ├── commander@2.6.0 ├── jstransformer@0.0.2 (is-promise@2.0.0, promise@6.1.0) ├── mkdirp@0.5.1 (minimist@0.0.8) ├── constantinople@3.0.2 (acorn@2.2.0) ├── with@4.0.3 (acorn@1.2.2, acorn-globals@1.0.5) ├── uglify-js@2.4.24 (uglify-to-browserify@1.0.2, async@0.2.10, yargs@3.5.4, source-map@0.1.34) ├── clean-css@3.3.9 (commander@2.8.1, source-map@0.4.4) └── transformers@2.1.0 (promise@2.0.0, css@1.0.8, uglify-js@2.2.5) mongodb@2.0.41 node_modules\mongodb ├── es6-promise@2.1.1 ├── readable-stream@1.0.31 (inherits@2.0.1, isarray@0.0.1, string_decoder@0.10.31, core-util-is@1.0.1) └── mongodb-core@1.2.10 (bson@0.4.11, kerberos@0.0.12) mongoose@4.1.2 node_modules\mongoose ├── regexp-clone@0.0.1 ├── sliced@0.0.5 ├── muri@1.0.0 ├── mpromise@0.5.4 ├── hooks-fixed@1.1.0 ├── kareem@1.0.1 ├── mpath@0.1.1 ├── async@0.9.0 ├── ms@0.1.0 ├── mquery@1.6.1 (bluebird@2.9.26) ├── mongodb@2.0.40 (readable-stream@1.0.31, es6-promise@2.1.1, mongodb-core@1.2.9) └── bson@0.3.2 (bson-ext@0.1.12) James@13JY1W1 /E/nodejs/_projects/nodeauth $ npm start > nodeauth@0.0.0 start e:\nodejs\_projects\nodeauth > node ./bin/www
There is no error here, the modules installed successfully. 这里没有错误,模块安装成功。 The various compiler-related messages are merely warnings, but the compilation was a success.
各种与编译器相关的消息仅仅是警告,但编译是成功的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.