mongoose console returns undefined


i've installed mongoose using `projectFolder$ npm install mongoose'

i have no issue with mongo console but when i entered the following commands

projectFolder$ node


>var mongoose = require('mongoose');


i have no issue starting node server, and mongo server as i could start up my website no issue. I ran into trouble just when i try the above commands in the console. i confirmed that mongoose is installed and the cursor returned undefined.

Problem courtesy of: bouncingHippo


Checks for node_modules/mongoose folder in your project If not, try it again:

npm install mongoose

EDIT: I removed var and works it

Solution courtesy of: eseceve


There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.