I am trying to deploy my project but I get this error which is causing a 404, altough the build is said to be successfully deployed. I tried googling around but could not find a solution to this. The project is using React Vite.
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"dev": "vite",
"build": "vite build",
"lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"start": "serve build -s -n -L -p $PORT"
},