Problem deploying fullstack - error 404 not found

I’ve been trying to deploy my simple phonebook application online.
Everything works fine local. I have built frontend and moved “dist” -folder to backend repository.
The problem is that only data passes to online website, but the website’s main page gives “Failed to load resource: the server responded with a status of 404 ()” - however …/api/persons and …/info works fine!
What seems to be problem? Please :slight_smile:

WEBSITE: → /api/persons … /info … /api/persons/#ID



The issue seems to be that your root path references a JS file that isn’t in your repo.

GET net::ERR_ABORTED 404 (Not Found)

dist/assets - only a CSS in there.


Oh wow, thanks a lot! Didn’t check if it’s blocked in .gitignore.
Seems like .gitignore is not working properly and it leaks… node_modules also going to github even if it’s ignored


Adding things to .gitignore only applies to future changes, it’s likely that node_modules were already tracked by git and they weren’t removed before adding that directory to .gitignore. You need to remove (git rm) items from git before adding their directory, filename, etc. to .gitignore.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.