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
nguoisechia vn
1,300 PointsstudentProfile.on is not a function
I can't search username "chalkers" and when I search it, the server reply error like this:
studentProfile.on("end", (profileJSON) => {
^
TypeError: studentProfile.on is not a function
at Object.user (/Users/mikegraham/Google Drive/WebstormProjects/NodeJS_Basic/DynamicWeb/router.js:30:24)
at Server.<anonymous> (/Users/mikegraham/Google Drive/WebstormProjects/NodeJS_Basic/DynamicWeb/app.js:15:12)
at emitTwo (events.js:100:13)
at Server.emit (events.js:185:7)
at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:537:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
Process finished with exit code 1
Chris Skinner
3,807 PointsChris Skinner
3,807 PointsHas anyone managed to find out why this error is caused. I'm having the same issue.