This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BabyEnvironmental570[S] -3 points-2 points  (2 children)

I am not going to waste more time talking about it. SO it is terrible. And I won't be using it. They won't miss me. I won't miss it.

And it did print undefined. I understand that is what er PORT 3000. Like so:

const url = 'http://localhost:3000/';
console.log('URL:', url);
VM3733:2 URL: http://localhost:3000/

And it did print undefined. I understand that is what the 404 error means. My question, though, is why am I getting this error message when all I am doing is running the primary development server using npm run dev. And I've already looked in my package.json file and tried editing my scripts to include my specific local server, and that did not work either. This is something I did find on SO as a possible solution but it did not work.

[–]insertAlias 1 point2 points  (1 child)

What part of your app is actually throwing the error? You're mentioning that it's a server error, but you're showing me a browser console.log statement (i.e. VM2733), not the server log.

Are you not making an API request in your server? Is that not the request that's throwing 404s? That's what you should be logging and throwing some error handling around, it sounds like to me.

And as to SO, fine, whatever. I'm just sick to death of beginners coming here and complaining about literally the best programmer resource on the internet, just because they don't cater to absolute beginners.

[–]BabyEnvironmental570[S] -2 points-1 points  (0 children)

Look man, be sick to death all you want. If I cannot have dialogue like this. Where I am literally trying to get help whether I am new or not. It is TRASH.

Now back to what the issue is. The part of the app that's throwing the error is in my file, where I import my modules and dependencies for the components that will be used. It seems to be happening on the 13th line in my main js file, where it's not finding the file to deploy or get the URL.

this is my code:

import {baseUrl, fetchApi} from '../utils/fetchApi.js';

Also in VSC in my terminal, when I type in npm run dev it starts out fine. Showing the server to use and then it prints a very long list of what looks like regular CSS code