Node: Cannot find module "mongoose" / Cannot install mongoose correctly -
wenn try start javascript-file test connection mongodb error message mongoose module cannot find. have installed mongoose "npm install mongoose" in node.js directory. when install mongoose following messages, thin not installed correctly:
> kerberos@0.0.10 install c:\zimmermann\nodejs\node_modules\mongoose\node_module s\mongodb\node_modules\mongodb-core\node_modules\kerberos > (node-gyp rebuild 2> builderror.log) || (exit 0) c:\zimmermann\nodejs\node_modules\mongoose\node_modules\mongodb\node_modules\mon godb-core\node_modules\kerberos>if not defined npm_config_node_gyp (node "c:\zim mermann\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bi n\node-gyp.js" rebuild ) else (rebuild) > bson@0.2.21 install c:\zimmermann\nodejs\node_modules\mongoose\node_modules\mo ngodb\node_modules\mongodb-core\node_modules\bson > (node-gyp rebuild 2> builderror.log) || (exit 0) c:\zimmermann\nodejs\node_modules\mongoose\node_modules\mongodb\node_modules\mon godb-core\node_modules\bson>if not defined npm_config_node_gyp (node "c:\zimmerm ann\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\no de-gyp.js" rebuild ) else (rebuild) mongoose@4.0.1 node_modules\mongoose ├── regexp-clone@0.0.1 ├── sliced@0.0.5 ├── hooks-fixed@1.0.1 ├── mpromise@0.5.4 ├── muri@1.0.0 ├── mpath@0.1.1 ├── async@0.9.0 ├── kareem@1.0.0 ├── ms@0.1.0 ├── mquery@1.4.0 (debug@0.7.4, bluebird@2.3.2) └── mongodb@2.0.24 (readable-stream@1.0.31, mongodb-core@1.1.20)
what can mongoose works correctly? have idea?
best regards benny
you can either of 2 things make run :-
1) install mongoose globally below steps :-
a)npm install mongoose -g
b) go app directory, module.js located , run
npm link mongoose
explanation :- when install package globally via npm, downloaded global node_module folder. me(mac user), it's under /usr/local/lib/node_modules/mongoose. link directory trying run node.js.
2) another approach install mongoose locally, not globally via
npm install mongoose
after following either of these, seeing node_modules --> mongoose folder under 'node.js' directory, means mongoose has been installed.
Comments
Post a Comment