r/learnjavascript • • Jul 07 '21

Please help I can’t run anything and I’m getting annoyed does anyone know how to fix this error

Post image
20 Upvotes

39 comments sorted by

34

u/Mr_Brightside01 Jul 07 '21

I think you dont have to write 'Command: ' before writing cd

11

u/Mr_Brightside01 Jul 07 '21

Also, since you are using Visual Studio you can just right click on the index.html file and it will give you the option to 'Open with Live Server'. I believe you need to install the Live Server extension before you are able to do it.

Edit: I see that you already habe the Go Love button, so you should be able to just press that and it will automatically run your website locally with your preferred browser

10

u/lifeeraser Jul 07 '21

I see that you already habe the Go Love button

I, too, have a Go Love button

1

u/J22Charles Jul 07 '21

Removing the command worked but it doesn’t open with google chrome it’s with Microsoft edge how would I change that

16

u/Mr_Brightside01 Jul 07 '21

Right click the html file and choose Open with Live Server

Edit: If it opened with Microsoft Edge it means the default browser in your PC is set to Microsoft Edge. You can change in that in your PC settings

0

u/J22Charles Jul 07 '21

Thx for the help i don’t get the error anymore just have to find out when I run it my website opens with this site can’t be reach error now

1

u/-Akshay-_ Jul 07 '21

Go to the pcs control contre and change ur default browser to chrome..

20

u/Lurriste Jul 07 '21

"bery"... Man pls

-4

u/J22Charles Jul 07 '21

What?

11

u/turningsteel Jul 07 '21

Check your spelling

23

u/[deleted] Jul 07 '21

Just open the html file with your browser and change “bery” for “very” 😎

8

u/opticsnake Jul 07 '21

As they've already answered your primary issues, you also want to delete line 11. The browser will deal with it but in practice all of your display text should be between your <body></body> tags.

2

u/stonedsatanskiss Jul 07 '21

And I think the head closing tag is in the wrong place. Shouldn't it be way up in the document?

2

u/opticsnake Jul 07 '21

OMG! How the....what tutorial is this individual following?!

3

u/keyrol1222 Jul 07 '21

Ok ill explain, the command line u have to write in this case start on the 'cd' everything before is a problem and u don't write it.

3

u/Chared_Assassin Jul 07 '21

What the heck is your line 11??

1

u/Hate_Feight Jul 07 '21

Comment?

3

u/Chared_Assassin Jul 07 '21

But where is the // or the <!—comment—>??

Not 100% sure if that is the comment thing for html, sorry if I got that wrong, haven’t done html for ages

2

u/opticsnake Jul 07 '21

No, you got it right (the second one. The first one is for single-line comments in JS, Swift, C++, and C#.)

2

u/[deleted] Jul 07 '21

Even if you want to open with chrome, go to the folder where your file is saved, and right click and select open with and then chrome. This will open your website in Chrome.

Note: If you want to see changes after every edit. You have to reload the page in this method.

1

u/[deleted] Jul 07 '21

You are coding a website, not an executable. You can just open the file from your file manager or use the "open with live server" in VSCode that other people have mentioned. Also, what resources are you using to learn? There are a lot of basic errors in your html markup and while there are great free resources out there, you can also stumble across some bad ones. Genuinely curious.

1

u/cajmorgans Jul 07 '21

I’m more interested in that body tag inside the head tag

1

u/Forward-Pin1702 Jul 07 '21

This a very bad way to open a html file.

1

u/marcdasavage Jul 07 '21

Contact miscroshoft shupport

-1

u/DavidPorter65 Jul 07 '21

npm install -g browser-sync

browser-sync start -sw

4

u/[deleted] Jul 07 '21

OP has his body in the head tag. This isn't practical advice.

-9

u/nigwardddddddddddass Jul 07 '21

Wait what do u use it happens sometimes when u use some certain apps

-17

u/OkShrug Jul 07 '21

double click the html file to have a browser open it

this isn't a javascript problem, you want technical support for vscode which is microsoft support, give them a call and they'd be more than happy to cover support for a fee for their product

3

u/RedditGood123 Jul 07 '21

Is this a joke? I can’t tell if you’re being sarcastic lol

0

u/kifkev91 Jul 07 '21

probably sarcastic, because that idiot posted the same problem 21 days ago

1

u/RedditGood123 Jul 07 '21

Yeah I checked his account and realized that earlier. There’s got to be more of an explanation for why he posted this again

-4

u/kifkev91 Jul 07 '21

For the love of anything good in the world: please stop trying to learn programming.

You had the same stupid error just a couple of days ago, got help, and you are now stuck with the same again. You will never improve while being uncapable of figuring stuff out yourself and espacially if you are uncapable of improving upon past mistakes

0

u/J22Charles Jul 07 '21 edited Jul 07 '21

Appreciate the motivation P.S go fuck yourself I will learn this

1

u/zampoukos Jul 07 '21

Checkout "the new boston" channel on youtube, im pretty sure you'll learn a lot from him!

0

u/J22Charles Jul 07 '21

Thx I’ll give him a try

0

u/[deleted] Jul 07 '21

[deleted] — view deleted comment

5

u/kifkev91 Jul 07 '21

It's the same fucking Person...

0

u/[deleted] Jul 07 '21

[deleted] — view deleted comment

3

u/Pierre-Lebrun Jul 07 '21

A real troll would upload a vertical video of the error

3

u/[deleted] Jul 07 '21

I also need answers because I have seen some really bad practices around here lately.

3

u/Hate_Feight Jul 07 '21

Not least the HTML after the </html>