Unitech / Unitech/pm2

Option to not pass extra arguments to processes (-name, -i, ...)

Open
#5,381 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

What's going wrong?

We are currently hosting our NextJS app on Azure and if we want to utilise every CPU we nee to use PM2. PM2 however passes additional arguments to NextJS on start and NextJS does not accept that argument and thus refuses to start. The process returns with: Unknown or unexpected option: --name

How could we reproduce this issue?

Create a new NextJS app and start it with the following command:

pm2 start node_modules/next/dist/bin/next --no-daemon -i max -- start -p 8080

Supporting information

PM2 version 4.5.6
NextJS version 12.0.2

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 by reproducing the PM2 command using node_modules/next/dist/bin/next with --no-daemon, -i max, and the -- separator. Trace how PM2 handles these arguments; done means an option exists to prevent PM2's extra arguments from reaching NextJS while preserving the application's start and -p 8080 arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, next.js, node.js
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.