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

JavaScript Build a Simple Dynamic Site with Node.js HTTP Methods and Headers Perfection Suggestions

Justin Sorensen
Justin Sorensen
14,734 Points

Receiving error: Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING

I've built this project following Andrew step by step and it works just fine, however, after searching profiles with a sample size of 3 profiles names, after a dozen or so searches I get this error: Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING. A quick google search eludes to a chache-control issue. Any takers for a fix?

1 Answer

Without giving us your code, all I can recommend is to check that every response.write() has a response.end(). That is a common cause this kind of error. If it works conditionally, check your conditional statements - if, else if, else.

Justin Sorensen
Justin Sorensen
14,734 Points

Hello Victor, I've placed my project at the url below. Note, this project contains the suggestion of adding an external css file. The app doesn't seem to perform at all with the addition, again receiving the same error. I've gone through and looked for proper placement of response.end() and can't find the issue.

https://github.com/david-j-davis/treehouse-nodejs-dynamic-ec.git

Thanks, David

Hi, Were you able to finally resolve this issue? I am having a similar experience.... connect ETIMEDOUT. Here is my work-space: https://w.trhou.se/11sba2yzdh