App version not correct
Open
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?
My app version is not correct.
I've a node server and in package.json there is "version": "1.0.0".
In pm2 list I see 0.35.3 .
After a research I've found that 0.35.3 is version of nvm (Node Version Manager (v0.35.3))
How could we reproduce this issue?
Starting new application, for example:
pm2 start npm --name NAME -- run SCRIPT
Supporting information
--- Daemon -------------------------------------------------
pm2d version : 4.5.0
node version : 14.3.0
node path : /home/u477360276/.nvm/versions/node/v14.3.0/bin/pm2
argv : /home/u477360276/.nvm/versions/node/v14.3.0/bin/node,/home/u477360276/.nvm/versions/node/v14.3.0/lib/node_modules/pm2/lib/Daemon.js
argv0 : node
user : u477360276
uid : 477360276
gid : 1049126324
uptime : 36min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 4.5.0
node version : 14.3.0
node path : /home/u477360276/.nvm/versions/node/v14.3.0/bin/pm2
argv : /home/u477360276/.nvm/versions/node/v14.3.0/bin/node,/home/u477360276/.nvm/versions/node/v14.3.0/bin/pm2,report
argv0 : node
user : u477360276
uid : 477360276
gid : 1049126324
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz
cpus nb : 40
freemem : 12807323648
totalmem : 269862096896
home : /home/u477360276
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬──────────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼──────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ Server │ default │ 0.35.3 │ fork │ 385896 │ 36m │ 0 │ online │ 0.2% │ 29.0mb │ u47… │ disabled │
└─────┴──────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/home/u477360276/.pm2/pm2.log last 20 lines:
PM2 | 2020-11-08T19:34:48: PM2 log: pid=358327 msg=process killed
PM2 | 2020-11-08T19:34:48: PM2 log: PM2 successfully stopped
PM2 | 2020-11-08T19:34:48: PM2 log: ===============================================================================
PM2 | 2020-11-08T19:34:48: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
PM2 | 2020-11-08T19:34:48: PM2 log: Time : Sun Nov 08 2020 19:34:48 GMT+0000 (Tempo coordinato universale)
PM2 | 2020-11-08T19:34:48: PM2 log: PM2 version : 4.5.0
PM2 | 2020-11-08T19:34:48: PM2 log: Node.js version : 14.3.0
PM2 | 2020-11-08T19:34:48: PM2 log: Current arch : x64
PM2 | 2020-11-08T19:34:48: PM2 log: PM2 home : /home/u477360276/.pm2
PM2 | 2020-11-08T19:34:48: PM2 log: PM2 PID file : /home/u477360276/.pm2/pm2.pid
PM2 | 2020-11-08T19:34:48: PM2 log: RPC socket file : /home/u477360276/.pm2/rpc.sock
PM2 | 2020-11-08T19:34:48: PM2 log: BUS socket file : /home/u477360276/.pm2/pub.sock
PM2 | 2020-11-08T19:34:48: PM2 log: Application log path : /home/u477360276/.pm2/logs
PM2 | 2020-11-08T19:34:48: PM2 log: Worker Interval : 30000
PM2 | 2020-11-08T19:34:48: PM2 log: Process dump file : /home/u477360276/.pm2/dump.pm2
PM2 | 2020-11-08T19:34:48: PM2 log: Concurrent actions : 2
PM2 | 2020-11-08T19:34:48: PM2 log: SIGTERM timeout : 1600
PM2 | 2020-11-08T19:34:48: PM2 log: ===============================================================================
PM2 | 2020-11-08T19:34:48: PM2 log: App [Server:0] starting in -fork mode-
PM2 | 2020-11-08T19:34:48: PM2 log: App [Server:0] online
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 report with pm2 start npm --name NAME -- run SCRIPT, using the version in package.json and the supplied PM2 environment details. Trace how the PM2 list obtains the displayed application version; done means the list reports the app version rather than the unrelated nvm version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100