Hello, I’m taking the Jumpstart Node.js course while trying to connect to MongoDB I receive the following error:
Microsoft Windows [Version 6.2.8250]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\\Users\\Paul>cd../../authentication
C:\\authentication>node app
C:\\authentication\
ode_modules\\mongoose\
ode_modules\\mongodb\\lib\\mongodb\\db.js:2
41
if(databaseName.indexOf(invalidChars[i]) != -1) throw new Error("database
^
Error: database names cannot contain the character '.'
at validateDatabaseName (C:\\authentication\
ode_modules\\mongoose\
ode_module
s\\mongodb\\lib\\mongodb\\db.js:241:59)
at new Db (C:\\authentication\
ode_modules\\mongoose\
ode_modules\\mongodb\\lib\\
mongodb\\db.js:79:3)
at NativeConnection.doOpen (C:\\authentication\
ode_modules\\mongoose\\lib\\driv
ers\
ode-mongodb-native\\connection.js:42:15)
at NativeConnection.Connection._open (C:\\authentication\
ode_modules\\mongoos
e\\lib\\connection.js:375:15)
at NativeConnection.Connection.open (C:\\authentication\
ode_modules\\mongoose
\\lib\\connection.js:234:8)
at Mongoose.connect (C:\\authentication\
ode_modules\\mongoose\\lib\\index.js:15
0:15)
at connect (C:\\authentication\\lib\\db.js:16:12)
at Object.<anonymous> (C:\\authentication\\lib\\db.js:11:1)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
C:\\authentication>
The offending script seems to be lib/db.js. I’m new to node.js so any help would be appreciated. Thanks.
–Ogian