Closed rossm-mf closed 4 years ago
Hi @rossm-mf,
That looks like an error that occurs when you attempt to invoke pm2
from a non-admin terminal. For the CLI to communicate with the instance of pm2
running in the service, it needs to be running in an elevated console. Otherwise it'll fail, attempt to spawn a daemon itself, then fail at that as well.
Make sure to right click and say "Run as Administrator" when starting a new console session.
Hope this is helpful!
I was using windows-terminal and for some reason it was not working. Now after few reboots, it's fine.
Hey @rossm-mf,
I'm a pretty big fan of Windows Terminal, but it does come with a few caveats that I've noticed while working on this project. One is that (unlike the standard Powershell interface) you can't right click the icon in the task bar and select "run as admin." Instead, you have to search for it in the Start menu and select "run it as admin" from there. I believe this restriction has something to do with packaging the app for the Windows store, but I'm not entirely certain about that.
Another issue I found is that opening up a new tab inherits the environmental variables from the initial Terminal process, so it won't contain the latest ENV values. For example, after the pm2-installer
setup completes, it requests that you start a new terminal session with the latest machine-level environmental variables before invoking pm2
. If you open a new tab instead of a completely new Terminal window, the new tab will be loaded with the ENV values from before the setup ran and pm2
won't be able to read the $env:PM2_HOME
value.
Regardless of these minor roadblocks, I'm very excited about Windows Terminal and can't wait for it to ship standard in Windows.
Glad to hear everything is working for you now! Hope this was helpful anyway.
Description Installation went well but I have an error when I try to see if pm2 is running with
pm2 ps
. I googled a little and some people talk about run as admin, which I already did. It seems to be related to the way we install pm2 on the machine. maybe you guys can help me on that part.Steps to Reproduce
pm2 ps
The Error
Environment
I ended with that on my global package list.