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

Databases

Daniel Boon
Daniel Boon
911 Points

TypeError: 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
Josh Keenan
20,315 Points

A quick google seems to return this as a good resource, I believe you should be using console.error

https://github.com/google/clasp/issues/20

Kevin Gates
Kevin Gates
15,053 Points

Yes, probably should be console.error

Daniel Boon
Daniel Boon
911 Points

But the file generating the error isn't my code