Unable to connect to strapi end points (404 Not found error)

might be a problem if you have typescript enabled but used a template by strapi. Templates are for some reason in vanilla Javascript so template files are .js, change these to .ts and it solved this problem for me.