Error: Root level logger middleware should be active

Tell us what’s happening:
Describe your issue in detail here.
I keep getting the above error even though it works on replit. Is it a bug on freecodecamp? What is the solution?
Thank you.
Your project link(s)

solution: https://replit.com/@pjmantoss/boilerplate-express

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36

Challenge: Implement a Root-Level Request Logger Middleware

Link to the challenge:

Hey there,

This is what you have:

console.log(`${req.method} ${req.path} ${req.ip} `);

This is the instruction:

it should log to the console a string taking the following format: method path - ip

I can see two issues with that.

Hope this helps

2 Likes

Issue solved. Test now passing. I was missing a ‘-’ between path and ip.
Thank you @Sky020 for your help.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.