I try to connect MongoDB from Mongo client on windows command (Window 8.1). When I use require()
in javascript, I have error as below. Does any one has same issue? Did I miss any require
related npm installation? How can't MongoDB shell find require
function?
C:\tutorial\nodeMongoAngular-master\lesson2>mongo
MongoDB shell version: 3.0.1
connecting to: test
var MongoClient = require('mongodb').MongoClient;
2015-04-30T14:33:25.812-0400 E QUERY ReferenceError: require is not defined
at (shell):1:19