I run this path https://stock-uat.thaijobjob.com/dashboard on my local machine without any issues, but when I upload it to the server, it shows a 404 error.
I can run this URL https://stock-uat.thaijobjob.com/ on the server, but when I refresh the page, it shows a 404 error.
Hi,
Did you change the base
path in vite.config.js?
By default, our previews are served under /metronic8/vue/demo1/
, when you deploy Metronic on your server, you should update base property up to the path on your server in file vite.config.js. If you do not have a nested folder on your server then you can set base path to /
.
You can read more about this property in the official documentation: https://vitejs.dev/guide/build#public-base-path.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Not working.
.
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js",
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
base: "/",
build: {
chunkSizeWarningLimit: 3000,
},
});
Hi,
Is the error still the same?
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Yes, it still shows a 404 error after I refresh it
Hi,
After further investigation, we were unable to reproduce the problem. To help us better understand the issue, could you please provide the full error message? Additionally, to verify that your production build is functioning correctly, run npm run preview
to test the production build locally.
Regards,
Lauris Stepanovs,
Keenthemes Support Team