Skip to content

minor version display bug pm2 list shows nvm version instead of app version and missing columns after reset #5960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wazzan opened this issue Mar 4, 2025 · 0 comments

Comments

@wazzan
Copy link

wazzan commented Mar 4, 2025

Preface

I want to preface this minor issue by saying this minor display bug did not break the install in any way the application and pm2 are working fine.

Description

After fresh global install of pm2 and n8n I noticed pm2 list shows the wrong version for n8n. So after reinstalling PM2 or clearing its cache, pm2 list loses default columns (namespace, version, pid, uptime, user, watching) and shows a reduced set (id, name, mode, , status, cpu, memory). It also reports the wrong version for a globally installed app (n8n), showing nvm’s version (0.40.1) instead of n8n’s (1.81.4).

Steps to Reproduce

  1. Install nvm 0.40.1 and Node.js 22.14.0
  2. Install n8n globally: npm install -g n8n (version 1.81.4)
  3. Install PM2: `npm install -g pm2@latest' (version 5.4.3)
  4. Use ecosystem.config.js:
    module.exports = {
      apps: [{
        name: 'n8n',
        script: '/home/user/.nvm/versions/node/v22.14.0/bin/n8n',
        args: 'start',
        env_file: '/home/user/.n8n/.env',
        cron_restart: '0 0 * * *',
        autorestart: true,
        watch: false,
        instances: 1,
        exec_mode: 'fork'
      }]
    };

5.Start: cd /home/user/.n8n && pm2 start ecosystem.config.js.
6.Check: pm2 list—shows full columns with version: 0.40.1.
7.Reset: pm2 kill && rm -rf ~/.pm2/* && cd /home/user/.n8n && pm2 start ecosystem.config.js.
8.Check again: pm2 list—missing columns, version gone or 0.40.1 in pm2 show n8n.

Expected Behavior

  • pm2 list consistently shows all default columns: id, name, namespace, version, mode, pid, uptime, ↺, status, cpu, mem, user, watching.
  • version reflects n8n’s 1.81.4 from /home/user/.nvm/versions/node/v22.14.0/lib/node_modules/n8n/package.json.

Actual Behavior

  • Post-reset, pm2 list drops to id, name, mode, ↺, status, cpu, memory.
  • version in pm2 show n8n shows 0.40.1 from nvm’s Git repo (/home/user/.nvm).

Outputs

  • Before Reset:
id name namespace version mode pid uptime status cpu mem user watching
0 n8n default 0.40.1 fork 7393 0s 0 online 0% 49.3mb user disabled
  • After Reset:
id name mode status cpu memory
0 n8n fork 0 online 0% 35.9mb
  • pm2 show n8n:
Key Value
version 0.40.1
script path /home/user/.nvm/versions/node/v22.14.0/bin/n8n
Revision control metadata
revision control git
remote url https://github.com/nvm-sh/nvm.git
comment v0.40.1
  • Environment:

    • OS: Debian
    • Node.js: 22.14.0
    • nvm: 0.40.1
    • PM2: 5.4.3
    • n8n: 1.81.4
  • Attempts to Fix

pm2 delete n8n && pm2 start ecosystem.config.js
pm2 kill && rm -rf ~/.pm2/* && pm2 start ecosystem.config.js
Reinstall PM2: npm uninstall -g pm2 && npm install -g pm2@latest

  • Notes:
  • vizion: false sets version to N/A but doesn’t restore columns.
  • n8n runs correctly as 1.81.4 (both GUI and binary confirms that)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant