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
I have seen this error before, but without your code I can't be certain, that it's the issue.
Anywhere in your code do you have a line like this:
app.use();
without
parameters? If so,
app.use()
actually requires multiple parameters and a callback, it
should
be formatted as so:
// This is what it should look like
app.use(function (req, res, next) {
console.log('Time: %d', Date.now());
next();
//Note you don't have to use 'next'
app.use(function (req, res) {
console.log('Time: %d', Date.now());
also note that you don't need to explicitly use req
or res
but you need to add them as parameters.