You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mhurwicz:~/workspace $ mongod --version
db version v2.6.11
2015-11-05T19:20:17.076+0000 git version: d00c1735675c457f75a12d530bee85421f0c5548
But now trying to execute this code:
var mongo = require('mongodb').MongoClient
mongo.connect('mongodb://localhost:27017/learnyoumongo', function(err, db) {
// db gives access to the database
})
I get the following:
module.js:338
throw err;
^
Error: Cannot find module 'mongodb'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/ubuntu/workspace/find.js:1:78)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:475:10)
The text was updated successfully, but these errors were encountered:
Evan - Thanks for the reply. That seems to have worked. For others who may run across this, on Cloud 9 I also got things working by editing package.JSON to add mongodb as a dependency:
I had some problems on install:
#20
But it seemed that mongo was available:
But now trying to execute this code:
I get the following:
The text was updated successfully, but these errors were encountered: