Answer the question
In order to leave comments, you need to log in
How to fix error when starting mongose.js?
Installed mongodb ran config. Installed mongose. wrote two lines from the help
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test');
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
C:\Users\Ivan\AppData\Roaming\npm\node_modules\bson>node "C:\Program Files\iojs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node- gyp\bin\node-gyp.js" rebuild
F:\projects\projects\test\node_modules\mongoose\node_modules\mongodb\node_modules\kerberos>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\ node_modules\node-gyp\bin\node-gyp.js" rebuild
Build projects in this solution one at a time. To enable parallel build, add the "/m" option.
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 Visual Studio 20
05 or 3) add the location of the component to the system path if it is installed elsewhere. [F:\projects\test\node_modules\mongoose\node_modules\mongod
b\node_modules\kerberos\build\binding.sln]
D:\projects\projects\closure-test>npm install --save mongoose
npm WARN package.json [email protected] No repository field.
|
> [email protected] install D:\projects\projects\closure-test\node_modules\mongoose
\node_modules\mongodb\node_modules\kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0) C:\Program Files\
nodejs
\node_modules\npm\bin\node-gyp-b
in \\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Build the projects in this solution one at a time. To enable parallel build, add
the "/m" option.
kerberos.cc
worker.
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) [D:\projects\projects\
closure-test\node_modules\mongoose\node_modules\mongodb\node_modules\kerberos\b
uild\kerberos.vcxproj]
security_buffer_descriptor. 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_descriptor.cc) [D:\project
s\projects\closure-test\node_modules\mongoose\node_modules\mongodb\node_modules
\kerberos\build\kerberos.vcxproj]
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_credentials.cc) [D:\projects\proj
ects\closure-test\node_modules\mongoose\node_modules\mongodb\node_modules\kerbe
ros\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) [D:\projects\projects
\closure-test\node_modules\mongoose\node_modules\mongodb\node_modules\kerberos\
build\kerberos.vcxproj]
base64.c
kerberos_sspi.c
Creating library D:\projects\projects\closure-test\node_modules\mongoose\n
ode_modules\mongodb \node_modules\kerberos\build\Release\kerberos.lib and obje
ct D:\projects\projects\closure-test\node_modules\mongoose\node_modules\mongo
db\node_modules\kerberos\build\Release\kerberos.exp
Generating code
Finished generating code
kerberos.vcxproj -> D:\projects\projects\closure-test\node_modules\mongoose\n
ode_modules\mongodb\node_modules\kerberos\build\Release\\kerberos.node
[email protected] node_modules\mongoose
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])
Answer the question
In order to leave comments, you need to log in
Apparently it can't find the bson module .
Try installing it separately manually: npm install bson
And by the way, what version of node.js/npm are you using?
Under windows, some things do not work well, believe me - I myself sin like this
. With a node, I can only advise you to read the instructions for installing node-gyp under these windows of yours =)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question