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 trialSean Flanagan
33,235 PointsWrong workspace
Hi. I noticed that the workspace in the video is completely different to the workspace that opens when I click the Launch Workspace button. Why is this? Has there been a mistake or something?
5 Answers
Autumn Wind
Courses Plus Student 6,282 PointsI had the same problem. It seems there is a bug, but you can get around it by the following steps:
- Click "Launch Workspace"
- When the modal window pops up: Click "Launch Different Workspace"
- Fill out the form: Enter a title (e.g. "My Uses for Closures"), select "Any Environment," and finally, select the workspace template that matches the name of this video ("Uses for Closures").
Submit the form, and that should get you the right workspace.
Amelia Groen
6,144 PointsI'll pile on: The wrong workspace is also launching for me, it matches the one Sean Flanagan has posted below.
The wokspace that's being launched instead: Node.js Basics - Handling Parsing Errors with try and catch
Sam Matthews
Full Stack JavaScript Techdegree Student 17,074 PointsI'm also getting this workspace launching.
Marko Bezic
Full Stack JavaScript Techdegree Graduate 27,826 Pointsstill showing the wrong workspace
Jennifer Nordell
Treehouse TeacherHi there! When I click the launch workspace button, it launches a workspace that matches the video. That being said, the workspace that you'll be using isn't shown until around 2 minutes into the video. The first part of the code that is shown is the "morgan" middleware code.
If the workspace you're finding doesn't match the video at 2:14, I would highly suggest you report this to Support at help@teamtreehouse.com.
Hope this helps!
Sean Flanagan
33,235 PointsHi Jennifer. Thanks for your reply. I clicked on 2 minutes 14 seconds on the video. Then I clicked Launch Workspace. The workspace I have doesn't match. It has an app.js file. Here's its code:
// Problem: We need a simple way to look at a user's badge count and JavaScript points
// Solution: Use Node.js to connect to Treehouse's API to get profile information to print out
// Require https module
const https = require('https');
// Print error messages
function printError(error) {
console.error(error.message);
}
//Function to print message to console
function printMessage(username, badgeCount, points) {
const message = `${username} has ${badgeCount} total badge(s) and ${points} points in JavaScript`;
console.log(message);
}
function getProfile(username) {
try {
// Connect to the API URL (https://teamtreehouse.com/username.json)
const request = https.get(`https://teamtreehouse.com/${username}.json`, response => {
if (response.statusCode === 200) {
let body = "";
// Read the data
response.on('data', data => {
body += data.toString();
});
response.on('end', () => {
try {
// Parse the data
const profile = JSON.parse(body);
// Print the data
printMessage(username, profile.badges.length, profile.points.JavaScript);
} catch (error) {
printError(error);
}
});
}
});
request.on('error', printError);
} catch (error) {
printError(error);
}
}
const users = process.argv.slice(2);
users.forEach(getProfile);
I've told Support about this.
Jennifer Nordell
Treehouse TeacherSean Flanagan my best suggestion to you right now is to delete that workspace. Click on the workspace link at the top here and find it and delete it. The next time you click "Launch Workspace" it should create a new workspace with the files for that video. If this still doesn't work, you should definitely contact support.
wildgoosestudent
11,274 PointsI submitted this today
Nick B.
Full Stack JavaScript Techdegree Graduate 31,101 PointsI get Python workspace.
Dates and Times in Python - Manipulating Time Already
Has anyone reported this issue?