Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.