S
S
s1vemod2021-08-18 15:31:29
Nginx
s1vemod, 2021-08-18 15:31:29

How to serve JS in Vue using Nginx?

Good afternoon.
Deploying a project with Vue.
Everything seems to be fine, everything is loading, but when it comes to requests to the server, this error comes up:

We're sorry but project doesn't work properly without JavaScript enabled. Please enable it to continue.


On the backend, Flask running with handles is spinning.
If I run a vue project like this: npm run serve , then everything works fine.
If I do build, then when I try to request, it gives an error, which is indicated above.

nginx:
server {
        listen 59081;
        server_name localhost;
        root /home/user/proj/app/dist;
        index index.html index.htm;
        location / {
                try_files $uri $uri/ /index.html;
        }
        error_log /var/log/nginx/proj-error.log;
        access_log /var/log/nginx/proj-access.log;

}


Please tell me how can I solve this problem?
Thank you in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2021-08-18
@deliro

Enable JS in browser, tag <noscript>works if JS doesn't work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question