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
I am working through Chapter 8, page 177 where I am trying to get the photo album server to startup after implementing the very first steps in MongoDB integration, and I keep getting the same error sequence:
..\Node\Tutorial\photo_album_express\app\node_modules\mongodb\lib\mongo_client.js:350
throw err
^
Error: Callback was already called.
at ..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:840:32
at Db.collection (..\Node\Tutorial\photo_album_express\app\node_modules\mongodb\lib\db.js:457:27)
at async.waterfall.exports.albums (..\Node\Tutorial\photo_album_express\app\data\db.js:33:16)
at nextTask (..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:5070:14)
at ..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:5064:13
at apply (..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:21:25)
at ..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:56:12
at ..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:843:16
at MongoClient.connect (..\Node\Tutorial\photo_album_express\app\data\db.js:25:17)
at connectCallback (..\Node\Tutorial\photo_album_express\app\node_modules\mongodb\lib\mongo_client.js:428:5)
The "db.js:33:16" is referencing the db.collection("albums", cb); line and the "db.js:25:17" is referencing the cb(null) line within the MongoClient.connect function.
I am working through Chapter 8, page 177 where I am trying to get the photo album server to startup after implementing the very first steps in MongoDB integration, and I keep getting the same error sequence:
..\Node\Tutorial\photo_album_express\app\node_modules\mongodb\lib\mongo_client.js:350
throw err
^
Error: Callback was already called.
at ..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:840:32
at Db.collection (..\Node\Tutorial\photo_album_express\app\node_modules\mongodb\lib\db.js:457:27)
at async.waterfall.exports.albums (..\Node\Tutorial\photo_album_express\app\data\db.js:33:16)
at nextTask (..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:5070:14)
at ..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:5064:13
at apply (..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:21:25)
at ..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:56:12
at ..\Node\Tutorial\photo_album_express\app\node_modules\async\dist\async.js:843:16
at MongoClient.connect (..\Node\Tutorial\photo_album_express\app\data\db.js:25:17)
at connectCallback (..\Node\Tutorial\photo_album_express\app\node_modules\mongodb\lib\mongo_client.js:428:5)
The "db.js:33:16" is referencing the db.collection("albums", cb); line and the "db.js:25:17" is referencing the cb(null) line within the MongoClient.connect function.
I even tried replacing my data/db.js file with exactly what you provide in repository (https://github.com/marcwan/LearningNodeJS/blob/master/Chapter08/02_create_album/app/data/db.js)
I've searched around but I can't seem to figure out this snag. What is happening?
The text was updated successfully, but these errors were encountered: