I bought the Metronic Dashboard, and I am trying to deploy a demo dashboard to Render.com. It works, but the app is stuck in a loading state.
https://wealthtracker.onrender.com/
Locally everything works with
yarn dev
or
vite preview.
But as soon as I try to use
serve -s -l 4173
to simulate locally what Render.com is doing, it fails with the exact same error (stuck in loading state).
The error in the console is
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.
The docs here https://preview.keenthemes.com/metronic8/react/docs/deployment are not helping and they contain errors.
"Setup baseURL via homepage" and then you use "base" instead of "homepage".
And also the "serve -s build -l 5000" command is not correct because by default there is not "build" folder but a "dist" folder.
By the way, I can't access the docs via https://preview.keenthemes.com/metronic8/react/docs/quick-start
There is no link to "deployment"
Hi,
Thank you for reaching out to us.
In the latest Metronic React versions, we've migrated to the React Vite app.
For deployment instructions, check the official Vite documentation: https://vitejs.dev/guide/static-deploy.html#render
Ensure to update the baseUrl
property in vite.config.ts
with the relative path of your server.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
I have a similar problem, I have already tried to publish the code generated by yarn build, I have already placed the site on firebase hosting and also on vercel, and neither of them loads the site. Only locally is it working using yarn dev.
metronic react 8.2.4 demo1
node v20.5.0