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 Handling Routes in Node.js Populating User Information

Workspace unavailable error when using invalid username?

I'm getting an odd error: everything works fine if I use a valid username, such as chalkers or my own. If I use an invalid one, though, the browser gives me a "Treehouse Workspace Unavailable" message and I see the following in the console:

treehouse:~/workspace$ node app.js                                                            
Server running at http://workspace-url.                                                       
events.js:85                                                                                  
      throw er; // Unhandled 'error' event                                                    
            ^                                                                                 
Error: write after end                                                                        
    at ServerResponse.OutgoingMessage.write (_http_outgoing.js:413:15)                        
    at Profile.<anonymous> (/home/treehouse/workspace/router.js:39:16)                        
    at Profile.emit (events.js:107:17)                                                        
    at IncomingMessage.<anonymous> (/home/treehouse/workspace/profile.js:38:36)               
    at IncomingMessage.emit (events.js:129:20)                                                
    at _stream_readable.js:908:16                                                             
    at process._tickCallback (node.js:355:11)                                                 
treehouse:~/workspace$  

I even tried copying and pasting the code provided in the downloads section and I am still getting the error.