I ask my first question on stack because I despair :( Sorry if my english isn't good !
I develop a simple Quiz app with adonisjs to learn the framework and application deployment.
My problem is during the deployment. In developpement, I had no problem. Everthing works wtih "pnpm run dev" !
Now, I already clone the project on my vps with git in /var/www/myproject, run the 'pnpm run build' and configure the nginx "correctly".
I run the command 'node bin/server.js' (I created a service to run the command when the VPS starts.)
The nginx configuration :
server {
#root /var/www/projectName;
server_name mydomain.fr;
location / {
proxy_pass http://127.0.0.1:3333;
proxy_set_header Host $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;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/qfelbinger.fr/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/qfelbinger.fr/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
And now when I go to my domain with my browser, I have a problem with Vite I think (I have no experience with this tools):
The error message :
ENOENT: no such file or directory, open '/public/assets/.vite/manifest.json'
enter image description here
So, I go in the folder and I SEE the file with same right of all file in le project.
My vite configuration :
import { defineConfig } from 'vite';
import adonisjs from '@adonisjs/vite/client';
export default defineConfig({
plugins: [
adonisjs({
entrypoints: ['resources/css/app.css', 'resources/js/app.js'],
reload: ['resources/views/**/*.edge'],
}),
],
});
I use Edge template for the frontend.
If anyone have an idea, I'm here :) And I can give any information if you need it !
I try to install all project again with no changes. I execute "pnpm i" to install dev dependency but I know it's usless, so, nothing change... And I don't see anything on Vite documentation since few days...