Open kondekar opened 3 years ago
I had a similar issue, not the same error but worth a shot, have you tried giving NT AUTHORITY\Local Service user permissions (in my case I gave it full control, because I needed to modify/write to the directory).
Also, I downloaded PSTools (https://docs.microsoft.com/en-us/sysinternals/downloads/pstools) and run the following to give me a powershell window running as NT AUTHORITY\Local Service: .\PsExec.exe -i -u 'NT AUTHORITY\Local Service' powershell
If you then navigate to your project root in the new powershell window and run: pm2 start index.js
It should be listed as the local service user now. Hopefully any of the above helps :)
@jkamleh Thanks for giving a good direction to think. I gave full control to the root folder of App to Local Service. I also launched PowerShell running as NT AUTHORITY\Local Service. That made PM2 launch the app with status as online but the next moment status became "errored". The log file has this error - "Script %s had too many unstable restarts (%d). Stopped." Any idea further?
Having the same issue.
PM installer 3.1.5 Node v10.18.0 NPM 6.13.4 Windows Server 2012 R2
Please check out my interim solution at https://stackoverflow.com/questions/66765092/pm2-couldnt-start-the-app-and-the-app-ends-up-in-errored-status/67120616#67120616
Description PM2 couldn't run the app and the app ends up in "errored" status
Steps to Reproduce
Environment
Running on: 3/23/2021, pm2-installer 3.1.4 with node v14.16.0 and npm 6.14.11 on win32-6.3.9600.