Report this

What is the reason for this report?

Nuxt/Vue no assets/JS, Nginx configs necessary?

Posted on March 10, 2020

I deployed my Nuxt app and Node app and they both run and can communicate. But I face the issue that my Nuxt app (SSR) does not load the assets from webpack even though they were build successfully. I checked the dist folder and they are all inside.

Do I have to configure Nginx to make SSR-apps serve assets or event javascript?

Does anybody have experience in deploying a server-side rendered app and whether there are some traps?

Thanks!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @Effection,

This error might as well be related to both your WebPack and your Nginx configuration vhost file.

Usually, Nginx does server assets such as css,js without a problem so the problem is coming either from the vhost itself or from WebPack.

For Nginx, please make sure everything is in the server block for the domain and the location is the correct one. Additionally, if you have added somesort of caching whether it’s browser leverage caching or expiring headers, basically anything of any sort, make sure it’s properly added to the configuration file.

Regards, KDSys

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.