Unitech / Unitech/pm2

Init system not found issue on windows when try to 'pm2 startup'

Open
#5,613 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

I want to configure node js server even after restarting windows it need to run once the system turned on.

so i am trying to run command pm2 startup as per the documentation

Am receiving the following error

[PM2][ERROR] Init system not found
C:\Users\sarav\AppData\Roaming\npm\node_modules\pm2\lib\API\Startup.js:209
throw new Error('Init system not found');
^

Error: Init system not found
at API.CLI.startup (C:\Users\sarav\AppData\Roaming\npm\node_modules\pm2\lib\API\Startup.js:209:13)
at Command. (C:\Users\sarav\AppData\Roaming\npm\node_modules\pm2\lib\binaries\CLI.js:707:9)
at Command.listener (C:\Users\sarav\AppData\Roaming\npm\node_modules\pm2\node_modules\commander\index.js:315:8)
at Command.emit (events.js:400:28)
at Command.parseArgs (C:\Users\sarav\AppData\Roaming\npm\node_modules\pm2\node_modules\commander\index.js:651:12)
at Command.parse (C:\Users\sarav\AppData\Roaming\npm\node_modules\pm2\node_modules\commander\index.js:474:21)
at Timeout._onTimeout (C:\Users\sarav\AppData\Roaming\npm\node_modules\pm2\lib\binaries\CLI.js:206:15)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/API/Startup.js around the reported line 209 and the pm2 startup documentation, then reproduce pm2 startup on Windows. Determine whether Windows startup is supported and define done as a supported boot-time configuration or an explicit, documented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.