#Nuxt rendering twice when uploaded to server
8 messages · Page 1 of 1 (latest)
I actually did not i will try later. Thanks @queen basin
I tried now and the preview works perfectly fine but when i spin up a nuxt build command and use the "node .output/server/index.mjs " command to run a node server it does the same issue. Any ideas? @queen basin
Also i have noticed that it does a full page refresh when going from page to page when uploading it to my vps and using nuxt preview
Nuxt rendering twice when uploaded to server
So the issue doesn’t seem to be PM2, that’s just node process manager. It’s likely an issue with your build. Can you check console for hydration warnings?
I checked the console and there is no error
Its very weird. The process i did was to copy all of my files from my local machine to my vps except for **.output **and .nuxt. Then i ran npm install in the directory, then npm run build and finally i tried running the node server with PORT=3001 node .output/server/index.mjs. But the issue still persists. This is my nginx conf if it has something to do with it: ```server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
{{ssl_certificate_key}}
{{ssl_certificate}}
server_name padelsoenderborg.vinumweb.com;
{{root}}
{{nginx_access_log}}
{{nginx_error_log}}
if ($scheme != "https") {
rewrite ^ https://$host$uri permanent;
}
location ~ /.well-known {
auth_basic off;
allow all;
}
{{settings}}
index index.html;
location / {
proxy_pass http://127.0.0.1:{{app_port}}/;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass_request_headers on;
proxy_max_temp_file_size 0;
proxy_connect_timeout 900;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
}
}```