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

Vue Aplicattion publish error with nginx.


I download de Vue Metronic 8.2.3 Demo 1 and after run npn run build don't work with nginx I juste receveid error this messages:

1. Loading module from “http://vod.mydev.wtf/metronic8/vue/demo1/assets/index-9fb06229.js” was blocked because of a disallowed MIME type (“text/html”).

2. The stylesheet http://vod.mydev.wtf/metronic8/vue/demo1/assets/index-84c2bcbb.css was not loaded because its MIME type, “text/html”, is not “text/css”. vod.mydev.wtf

3. The stylesheet http://vod.mydev.wtf/metronic8/vue/demo1/splash-screen.css was not loaded because its MIME type, “text/html”, is not “text/css”. vod.mydev.wtf

My nginx conf file is:

server {
listen 80;
server_name vod.mydev.wtf;

root /var/www/vod/dist;

location / {
try_files $uri $uri/ /index.html;
}

types {
text/html html htm shtml;
text/css css;
application/javascript js;
}

}

Can you help me fix plz.


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 (6)


Hi Alex Braz,

Thank you for reaching out to us.

We didn't manage to reproduce this error in the latest Metronic version.

You can find instructions on deploying Vue Vite application in official Vite docs: https://vitejs.dev/guide/static-deploy.

Please ensure that you build and deploy your application correctly.

Also, let us know if have made any changes to our codebase.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Right, I tried any methods but don't work... can you give me plz on nginx .conf file example for can I test?



Right, I tried any methods but don't work... can you give me plz on nginx .conf file example for can I test?



Hi Alex,

Sorry for the late reply.

Unfortunately, we do not have any pre-build nginx configuration and it should be configurated according to your server's paths.

You can find some guidance on a fix in the StackOverflow question below.
https://stackoverflow.com/questions/59925804/blocked-because-of-a-disallowed-mime-type-text-html-angular-8-deployed-on

Regards,
Lauris Stepanovs,
Keenthemes Support Team



I changed the vite file config for start in "/" directory and work normally, thanks you for help.



Hi,

Glad to hear that. Please let us know if you have any additional questions on this topic or anything else.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


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  :(