Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

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.



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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • 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:

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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(