Skip to content
Back

SPA Not working

  • 0
  • Web
  • Cloud
★ Remi ★
24 Dec, 2025, 05:10

So I'm using vite/react, which is spa, and it used to work before, but now whenever I go to any route except the root it shows appwrites 404 page, instead of using my routing, why is this?

TL;DR
The developer's SPA is not working properly. Instead of routing to the correct pages like `/account` or `/auth/login`, it is showing a 404 page. The issue might be related to routing or lazy loading. Check for any recent changes in routes/pages and ensure they are correctly set up.
Devika
24 Dec, 2025, 05:13

Do you get any errors while deploying the site? Also, which region you're using?

★ Remi ★
24 Dec, 2025, 05:13

NY, and I don't think so, let me check

★ Remi ★
24 Dec, 2025, 05:13

other than from postcss, no

Devika
24 Dec, 2025, 05:15

You said it used to work before and it's a SPA, then what do you mean by routing? Have you added more routes/pages recently?

★ Remi ★
24 Dec, 2025, 05:17

Everything should route to index.html, and the code inside my project is what should do the routing, using react-router. I belive their are new routes, I don't think that could be a cause

★ Remi ★
24 Dec, 2025, 05:17

And it used to work.

Devika
24 Dec, 2025, 05:20

Can you share with me the deployed link?

★ Remi ★
24 Dec, 2025, 05:20
Devika
24 Dec, 2025, 05:28

As I can see, you're directly using /account route here upon clicking the login/signup button instead of a /login or /signup route which means the user is getting redirected directly to the /account route even before he/she could login or signup. Don't you have any /login or /signup route?

★ Remi ★
24 Dec, 2025, 05:32

/account redirects to the login page if no account is signed in, but that route doesnt work either, which would be /auth/login

★ Remi ★
24 Dec, 2025, 05:33

it could be the lazy loading, but it's work in the past with it so

★ Remi ★
24 Dec, 2025, 05:35

my other vite project still works fine, which is werid because its basically the same setup

★ Remi ★
24 Dec, 2025, 05:35

idk if I fucked something up or not, but it's still weird

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more