Get 2024 Templates Mega Bundle!19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets
Get for 99$

Prod deployment with Metronic 8.2.1 not working


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"


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


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


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(