Open linonetwo opened 1 year ago
Above IS NOT WORKING.
But after use https://github.com/jessety/pm2-installer to start pm2 on background on win11 startup, this will not pop up cmd.exe window.
You need to run pm2 save
to save current tasks to the startup list, then on next startup, they will run on the backgound, and no popup.
I have the same problem. Running the npm cmd causes token error. Targeting npm-cli.js opens up a cmd.
https://github.com/Unitech/pm2/issues/3657#issuecomment-1552997822
This works for
npm run start
in win11, and will prevent cmd.exe window popup:I tried
C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js
with fork mode and it will popup cmd.exe.I tried cluster mode, but it won't execute things in npm script, if that script point to a ps1 or bat shell file in node_modules/.bin
But with interpreter
cmd.exe
+script: 'npm'
this works well.