I just cant get it to work for me. I want to start my project via pm2 on my windows server.
My project has a package.json like this:
{ "name": "testproject", "type": "module", ...
"scripts": { "dev": "vite --host",...
I usually start my project with "npm run dev". I thought thats standard stuff for running it in dev-env. And now to use pm2 I thought I need to run the following command: pm2 start npm --name frontend -- run dev or pm2 start npm --name "frontend" -- run "dev", but its always the same error: Script not found: C:\Projekte\testproject\run or something along those lines. While I have no problem starting my backend via pm2 using pm2 start backend.js --name backend
What am I missing?