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

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


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.


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



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:

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?


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