Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Daniel Boon](https://secure.gravatar.com/avatar/8f02ab5aeceedf01e48763597c701e8f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Daniel Boon
911 PointsTypeError: console.err is not a function
Hi,
I'm getting the following error when I run mongoose_sandbox.js.
Totally stuck - anyone have any ideas?
/Users/danielboon/Documents/Projects/qa-rest-api/node_modules/mongoose/node_modules/mongodb/lib/server.js:242 process.nextTick(function() { throw err; }) ^
TypeError: console.err is not a function at NativeConnection.<anonymous> (/Users/danielboon/Documents/Projects/qa-rest-api/mongoose_sandbox.js:11:10) at emitOne (events.js:116:13) at NativeConnection.emit (events.js:211:7) at NativeConnection.Connection.error (/Users/danielboon/Documents/Projects/qa-rest-api/node_modules/mongoose/lib/connection.js:449:8) at /Users/danielboon/Documents/Projects/qa-rest-api/node_modules/mongoose/lib/connection.js:478:15 at /Users/danielboon/Documents/Projects/qa-rest-api/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:59:21 at /Users/danielboon/Documents/Projects/qa-rest-api/node_modules/mongoose/node_modules/mongodb/lib/db.js:231:14 at Server.<anonymous> (/Users/danielboon/Documents/Projects/qa-rest-api/node_modules/mongoose/node_modules/mongodb/lib/server.js:240:9) at Object.onceWrapper (events.js:317:30) at emitTwo (events.js:126:13) at Server.emit (events.js:214:7) at Pool.<anonymous> (/Users/danielboon/Documents/Projects/qa-rest-api/node_modules/mongoose/node_modules/mongodb-core/lib/topologies/server.js:218:12) at Object.onceWrapper (events.js:317:30) at emitTwo (events.js:126:13) at Pool.emit (events.js:214:7) at Connection.<anonymous> (/Users/danielboon/Documents/Projects/qa-rest-api/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:119:12)
2 Answers
![Josh Keenan](https://secure.gravatar.com/avatar/d0419723c8add3c25619f65ab04909c9?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Josh Keenan
19,662 PointsA quick google seems to return this as a good resource, I believe you should be using console.error
![Josh Keenan](https://secure.gravatar.com/avatar/d0419723c8add3c25619f65ab04909c9?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Josh Keenan
19,662 PointsFound this thread for you, hope it helps:
https://teamtreehouse.com/community/mongodb-connection-error-2
Kevin Gates
15,053 PointsKevin Gates
15,053 PointsYes, probably should be
console.error
Daniel Boon
911 PointsDaniel Boon
911 PointsBut the file generating the error isn't my code