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 Asynchronous Programming with JavaScript Asynchronous JavaScript with Callbacks Async Programming and Callback Functions

Daven Hietala
Daven Hietala
8,040 Points

Unable to open workspace.

Okay, It has been 31 days. I have been trying to figure out how to use VS code because the work space will not open with this lesson. I have learned allot as a result. But really It has done nothing but slowed me down. I took and completed the VS code lesson. I took and completed the terminal lesson. I took and completed the node.js lesson. All of this HAS NOT enabled me to successfully use VS Code to complete this lesson.

I am still unable to get through the asynchronous javascript lesson with VS Code.

I feel like all of this frustration can be avoided if I could just use the workspace with this lesson.

Again 31 days!!!!!

31 days of no progress. This is preposterous.

I just took another screen shot of the workspace error window.

I have it on my computer.

HOW DO I COPY IT TO THIS POST?

3 Answers

Sorry, I'm just seeing the messages. Where does it say you need JSHint? Those extensions are helpers, if you like, but they are not needed. You can just write your basic javascript code and it should work anyway, regardless vscode marks it as valid or not (and it should).

I'd advise to uninstall your current setup (npm, node, git, bash, modules, maybe even vscode) and start anew. I see you are using Windows as I am: I'd try installing everything through Chocolatey. It's a command line app that lets you install software, and usually does it all for you. It picks the correct folders, configures things, etc.

Then you could install nodejs and npm writing "choco install nodejs", then vscode with "choco install vscode", git with "choco install git" and so on. Having nodejs correctly installed, and Vscode, you shouldn't need anything else to complete the course.

Learning this stuff is part of becoming a developer though. It's frustratingly convoluted at times, but its needed. Don't see it as wasting time you could spend going along with the course, but an opportunity to learn yet another skillset that you will need. Workspaces makes it easier as a beginner, but it totally spoils you, I agree.

Let me know if you need more help, maybe we can go trough it set by step.

Daven Hietala
Daven Hietala
8,040 Points

Thank you for your help Axel. I installed chocolatey, uninstalled node, git, and vs code, and reinstalled them via chocolatey as directed. I hope everything goes smoother now. So far so good.

To answer your question, it says I need JSHint in my code looking at VS Code. There are these little squiggly lines that show up underneath certain pieces of syntax indicating that something is wrong. When I hover over them an alert box shows up stating, for example, "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz). (W104)jshint(W104)". But like you said the code works anyway. I would like to know how to make those go away. Because I do have the eslint extension installed. It's wierd.

Again thank you Axel, it feels good to know that there are people out there such as your self. I will let you know if I have any more questions.

Have a good one!

Daven

Daven Hietala I guess you installed the JSHint extension for vscode. It throws that warning by default, it's just so you are aware that your code needs es6 support to run (duh, we know). You can shut it up by pasting this comment at the top of the file

/*jshint esversion: 6 */

You could enable the setting globally as well; I just don't use jshint. It's too "strict" for my taste, e.g. it thinks I should put semicolons everywhere, and in a workplace environment you just do whatever your team agrees on anyway.

Hi Daven Hietala, what's wrong with doing this lesson in VSCode? I'm doing it with no problem whatsoever. If you are a bit more specific maybe I could help.

Daven Hietala
Daven Hietala
8,040 Points

Basically I have been spoiled by workspaces. What I ended up doing was deleting all of the files from this asynchronous javascript lesson from VsCode and re downloading a fresh copy of the files so that I could start over from scratch.

That seemed to do the trick. Now I am humming along.

The problem is I keep hitting these technical roadblocks that are overwhelming to figure out when all I want to do is complete this lesson!

For example:

I am being told that some of the syntax I am using is only good if I have JsHint installed. I have JsHint installed..

In the js hint directions they say..

"The extension looks for a jshint module in the current directory and in the global package location. You can install jshint locally with npm install jshint or globally with npm install -g jshint. If your jshint module is in a different location, use the jshint.nodePath setting to specify the correct path. The jshint.packageManager setting can be used to specify which package manager you are using, npm or yarn.

To check where jshint is loaded from, use the JSHint: Show output command after the extension has started to view the extension logs in the output panel."

Trying to figure out how to do this I went ahead and stopped the asynchronous javascript lesson and did the lesson on node AND the lesson on the terminal AND the lesson on VS Code...

I STILL don't know how to successfully activate jshint. I downloaded Git Bash and linked it to the vs terminal to the best of my abilities.

But I still get syntax error squiggly underlines underneath some of my code indicating that the code I am using is only good when used with ES6.

I have ES6 installed.

Sorry for the lengthy reply. And thank you for taking the time to answer my question.

Daven

Daven Hietala
Daven Hietala
8,040 Points

Again, I just ran into a roadblock.

This time I was told to type console.log(breakfastPromise); and then to open the terminal in vs code and type node promises-breakfast.js.

This is what I got back..

"dell@dell-PC MINGW64 ~/Documents/Coding Projects $ node promises-breakfast.js internal/modules/cjs/loader.js:638 throw err; ^

Error: Cannot find module 'C:\Users\dell\Documents\Coding Projects\promises-breakfast.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)"

I don't have the terminal set up properly and it is killing my ability to smoothly complete these lessons because now I am distracted from the lesson trying to figure out how to properly set up the terminal instead of focusing on what a promise is in JavaScript.

I think you should message them at help@teamtreehouse.com. Also there is an option to create workspace on your own, so try that too.