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 Basics: Certain lessons workspaces not saving/working, while others do

Hi Treehouse peeps,

So I've started javascript basics and so far I have had some problems with the workspaces that you launch from the video window. Currently, the workspace I'm working on, Javascript Console, is not actually saving the code I write on "scripts.js". It seems that even when I correct the errors in the orignal file for scripts.js nothing is changing when I preview the page. I think this is the case because when I check my Chrome (on late 2014 iMac 10.10.5) Javascript Console I am still getting the same Uncaught SyntaxError message on line 1.

What's truly weird is that this also happened on the first lesson, Write Another Program's workspaces, BUT NOT on the lesson's workspace BEFORE this, Link to External Script. So it very well may be me but I'm not quite sure what I'm doing.

Here is my code...


alert("hello there");
document.write("No it works!");


<!DOCTYPE html>
<html lang="en">
  <meta charset="utf-8">
  <link rel="stylesheet" href="css/main.css">
  <title>What's wrong with this script?</title>
  <div class="container">
  <h1>Can you get the JavaScript to work?</h1>
  <script src="scripts.js"></script>

Finally, here is what the Chrome's JS Console reads...

scripts.js:1 Uncaught SyntaxError: missing ) after argument list

If anyone here has a solution or is experiencing this same problem I would love to know what you did to solve.

Currently, on these lessons whose workspaces aren't working I'm downloading the workspace to desktop, opening and editing in sublime 2 and clicking the index to preview and everything seems to be working fine again. Yet another reason why I'm worried that it might be something weird with the treehouse server.

Would love to get this solved ASAP as this will make learning much easier.



2 Answers

Dave McFarland
Dave McFarland
Treehouse Teacher

Hi Hamilton Steele

Sorry workspaces isn't working for you. Could you take a snapshot of one of the problematic workspaces and share it in this discussion. It will let us fork and test your workspace. You can learn more about creating workspace snapshots in the Preview and Snapshots video.


Here's the link. Lmk if that's not right.

And just to update, out of curiosity, I went back to test and not sure what you guys did but thanks! Gettin my 25 bones worth here bb

Bradley Wise
Bradley Wise
405 Points

Um...Your program said: scripts.js:1 Uncaught SyntaxError: missing ) after argument list, which I believe i a Syntax Error message. So there most be a Syntax Error. (Ether in the JavaScript or the HTML)

If you run this script through your own browser you will not receive this console error, as I checked by running the index and scripts pages locally on my machine. Further, line one's syntax is entirely correct from what I can see. Again, this isn't a problem with my syntax--when I delete this alert and add any other non-sense code I'm still returned the same error, meaning treehouse's workspace isn't saving on their end, or so I believe.

Further, my program doesn't display that error, the JS console gives that error. Here's a link to the project if anyone wants to download it and test it themselves...