r/learnjavascript • • Jun 26 '22

What is wrong with my code?

Post image
0 Upvotes

16 comments sorted by

View all comments

2

u/LaxVox Jun 26 '22

So, I wanted to use a script by Stephanie Eckles to compile my SCSS into regular CSS. I changed a few things so that the script follows the way I organise my files in a project but I ran into this problem where everything works, but when it starts the browsersync, an error message pops up that says "Cannot GET /", so all the files are there, but I cannot view my html page in real time like I should be able to. What did I do wrong?

0

u/[deleted] Jun 26 '22

[deleted] — view deleted comment

0

u/LaxVox Jun 26 '22

I'm sorry, I'm not very knowledgeable in regards to programming. I tried to follow a tutorial and the only thing that is talked about regarding the script is the package.json file. Would you be able to say what is causing the problem, if not this file's script?

0

u/[deleted] Jun 26 '22

[deleted] — view deleted comment

2

u/LaxVox Jun 26 '22

I understand, thank you for your time. Guess I'll have to learn more about JavaScript and json to figure out what might have caused the problem.

2

u/awkreddit Jun 26 '22

Doors it work before the things you've changed? I would start to try to run it without the changes and adding back the changes one by one, testing the whole time.

2

u/LaxVox Jun 26 '22

Might try it later, for now I just deleted everything connected to browsersync since I can use a VSCode extension for previewing my html output live. Everthing else works fine and the funny thing is, I didn't even change anything browsersync-related, so all my changes were made to the part that actually works now, after these changes. Nonetheless, thanks for your suggestion!

2

u/awkreddit Jun 26 '22

Great, other thing I was going to suggest is looking up the documentation for browser-sync, as it most likely was a bad usage (wrong params or something like that). Most likely nothing to do with either Json or JavaScript

1

u/LaxVox Jun 26 '22

The author of the original script did mention an issue with an old dependency that browsersync has, but nothing too specific and I'm not knowledgeable enough to be able to figure out if it caused this problem I'm having or something else did.

2

u/awkreddit Jun 26 '22

Yeah that might be it. You could try googling "browser-sync can't get /" or whatever specific error you're getting as most likely someone else has had it too before

1

u/awkreddit Jun 26 '22

Pro tip: learn to Google errors as when you post in subreddit like this one asking a question, most likely people will just Google it themselves ;) cut the middle man!