Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
19,437 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
14,855 Points

Yes, probably should be console.error

Daniel Boon
Daniel Boon
911 Points

But the file generating the error isn't my code