Unitech / Unitech/pm2

Ecosystem file fails if name and args are the same

Open
#5,321 0 comments 0 reactions 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

Think I found a bug in 3.5.1

The following doesn't work:

    {
      name: 'woody',
      script: 'huebot/src/huebot.js',
      args: 'woody one',
      instances: 1,
      autorestart: true,
      watch: false,
      max_memory_restart: '1G',
      env: {
        NODE_ENV: 'production'
      },
      env_production: {
        NODE_ENV: 'production'
      }
    },
Error: Cannot find module '/home/node/woody'

But if I change name to "huebot_woody" it works fine.

Seems it's getting confused somehow.

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 failure with the provided ecosystem configuration, especially the relationship between the name and args values and the huebot/src/huebot.js script. Compare it with the working huebot_woody name; done means the original configuration starts successfully without the Cannot find module '/home/node/woody' error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Bug
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.