PM2 starting flag ```--name or ```name in config will attach ```name on ```process.env``
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?
PM2 starting flag --name or name in config will attach ${PM2_APP_NAME} on process.env, which override the original process.env.${OTHER_FRAMEWORK_VARIABLES}, which makes other frameworks or library doesnt properly retrive originals, which maybe loaded from .env and makes it doesnt boot properly (e.g: @nestjs/config)
How could we reproduce this issue?
pm2 start ${APP} --name ${SOME_APP_NAME_OVERRIDE_ENV_VAR}
Possible Solution
use PM2_ prefix when pm2 attaches variable to process.env
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the shown pm2 start command and with a name value in config, then trace where PM2 attaches variables to process.env. Done means PM2-specific variables no longer overwrite existing framework environment variables, including the reported @nestjs/config case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100