Skip to content
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

pm2 install gives WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. #5134

Closed
james-bw opened this issue Jul 29, 2021 · 23 comments

Comments

@james-bw
Copy link

What's going wrong?

root@myhost:~# npm install pm2 -g
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

added 180 packages, and audited 181 packages in 6s

10 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
root@myhost:~# npm -v
7.20.2
root@myhost:~# node -v
v12.22.2

How could we reproduce this issue?

On new Ubuntu 20 linux install:

  1. Install Node 12
  2. Upgrade npm using npm install -g npm
  3. Install pm2 using npm install pm2 -g

Supporting information

$ pm2 report
--- PM2 report ----------------------------------------------------------------
Date                 : Thu Jul 29 2021 07:15:33 GMT+0000 (Coordinated Universal Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 5.1.0
node version         : 12.22.2
node path            : /usr/bin/pm2
argv                 : /usr/bin/node,/usr/lib/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : root
uid                  : 0
gid                  : 0
uptime               : 0min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 5.1.0
node version         : 12.22.2
node path            : /usr/bin/pm2
argv                 : /usr/bin/node,/usr/bin/pm2,report
argv0                : node
user                 : root
uid                  : 0
gid                  : 0
===============================================================================
--- System info --------------------------------------------
arch                 : arm64
platform             : linux
type                 : Linux
cpus                 : unknown
cpus nb              : 2
freemem              : 2532102144
totalmem             : 4056465408
home                 : /root
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬───────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id  │ name      │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
└─────┴───────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/root/.pm2/pm2.log last 20 lines:
PM2        | 2021-07-29T07:15:33: PM2 log: ===============================================================================
PM2        | 2021-07-29T07:15:33: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
PM2        | 2021-07-29T07:15:33: PM2 log: Time                 : Thu Jul 29 2021 07:15:33 GMT+0000 (Coordinated Universal Time)
PM2        | 2021-07-29T07:15:33: PM2 log: PM2 version          : 5.1.0
PM2        | 2021-07-29T07:15:33: PM2 log: Node.js version      : 12.22.2
PM2        | 2021-07-29T07:15:33: PM2 log: Current arch         : arm64
PM2        | 2021-07-29T07:15:33: PM2 log: PM2 home             : /root/.pm2
PM2        | 2021-07-29T07:15:33: PM2 log: PM2 PID file         : /root/.pm2/pm2.pid
PM2        | 2021-07-29T07:15:33: PM2 log: RPC socket file      : /root/.pm2/rpc.sock
PM2        | 2021-07-29T07:15:33: PM2 log: BUS socket file      : /root/.pm2/pub.sock
PM2        | 2021-07-29T07:15:33: PM2 log: Application log path : /root/.pm2/logs
PM2        | 2021-07-29T07:15:33: PM2 log: Worker Interval      : 30000
PM2        | 2021-07-29T07:15:33: PM2 log: Process dump file    : /root/.pm2/dump.pm2
PM2        | 2021-07-29T07:15:33: PM2 log: Concurrent actions   : 2
PM2        | 2021-07-29T07:15:33: PM2 log: SIGTERM timeout      : 1600
PM2        | 2021-07-29T07:15:33: PM2 log: ===============================================================================

@dontbesatisfied
Copy link

same issue

@DavidProf
Copy link

DavidProf commented Sep 10, 2021

To solve this problem it is necessary to update some dependencies from pm2/io package | pm2/io repo.
The dependencies that are giving the warning are probably these @opencensus/core & @opencensus/propagation-b3, just update to version 0.0.22 or 0.1.0 must work at least for production(final build), but that would break the build so it's not easy as change 2 digits.

The warning is really annoying tho

P.S. There are warnings in the dev dependencies too but I don't know if they will matter.

@flysnoworg
Copy link

This library uses too many old dependencies. Is no one maintaining it anymore?

@KevinNovak
Copy link

Any updates on this? I have been trying to get rid of warnings in my app and pm2 is the only one left causing issues.

@DavidProf
Copy link

DavidProf commented Jan 11, 2022

@KevinNovak nop, I tried to update one time but I had some problems doing it, so I created a issue where the problem is, to ask for help but for now, there's no update.

I did this fork but I broke a lot of things and I still don't have the time to see it.

If that's too annoying you could try to fix and open a PR, but I'm not sure if they will approve (are they active?).

Edit:

Actually, there is a pull request regarding this

keymetrics/pm2-io-apm#287

But it was not approved yet because it has conflicts

@thecertifiednoob
Copy link

any update ?

@DavidProf
Copy link

DavidProf commented Mar 18, 2022

any update ?

@thecertifiednoob

There is an issue for the problem:

Not that someone really cares to fix it. Like me btw, that just gave in because I didn't want to use it anymore (doesn't have a use for my use case nowadays). And it is just a warning, not really that important for this project in specific, just annoying.

@cesarjorgemartinez
Copy link

+1 here
when is solved?

@cesarjorgemartinez
Copy link

Using node 16:

npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

@sephentos
Copy link

@Unitech Could you please leave some information here? This 3-year old deprecated module should be updated imo.

@robbiedood
Copy link

Same here. Hope to hear your expertise on the issue.

@longpt99
Copy link

longpt99 commented Sep 9, 2022

@Unitech Any update on this issue? It's too outdated. Hope to hear from you guy soon

@xpcovertech
Copy link

warning pm2 > @pm2/io > @opencensus/propagation-b3 > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning pm2 > @pm2/io > @opencensus/core > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning pm2 > @pm2/io > @opencensus/propagation-b3 > @opencensus/core > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
[2/4] 🚚 Fetching packages...
error create-strapi-app@4.1.9: The engine "node" is incompatible with this module. Expected version ">=12.22.0 <=16.x.x". Got "18.12.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

@victorbondaruk
Copy link

npm install -g @soketi/soketi
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
soketi start
/usr/lib/node_modules/@soketi/soketi/node_modules/uWebSockets.js/uws.js:22
                throw new Error('This version of uWS.js supports only Node.js 14, 16 and 18 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString());
                ^

Error: This version of uWS.js supports only Node.js 14, 16 and 18 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).

Error: Cannot find module './uws_linux_x64_111.node'
Require stack:
- /usr/lib/node_modules/@soketi/soketi/node_modules/uWebSockets.js/uws.js
- /usr/lib/node_modules/@soketi/soketi/dist/server.js
- /usr/lib/node_modules/@soketi/soketi/dist/index.js
- /usr/lib/node_modules/@soketi/soketi/dist/cli/cli.js
- /usr/lib/node_modules/@soketi/soketi/dist/cli/index.js
- /usr/lib/node_modules/@soketi/soketi/bin/server.js
    at /usr/lib/node_modules/@soketi/soketi/node_modules/uWebSockets.js/uws.js:22:9
    at Object.<anonymous> (/usr/lib/node_modules/@soketi/soketi/node_modules/uWebSockets.js/uws.js:24:3)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)
    at Module._load (node:internal/modules/cjs/loader:922:12)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/usr/lib/node_modules/@soketi/soketi/dist/server.js:18:13)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)

Node.js v19.3.0

@KevinNovak
Copy link

Could we get an update on this? I've been having this issue for over a year now. Is there some breaking change preventing package upgrades? Or is it just the risk involved? I wouldn't mind testing a pre-release version if it helped to address this.

@victorbondaruk
Copy link

I downloaded the version of node 8.19.2
npm -v 8.19.2
`npm install -g @soketi/soketi
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

changed 348 packages, and audited 349 packages in 1m

29 packages are looking for funding
run npm fund for details

1 high severity vulnerability

Some issues need review, and may require choosing
a different dependency.

Run npm audit for details. npm audit
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-12-27T18_58_34_193Z-debug-0.log soketi start

🕵️‍♂️ Initiating metrics endpoints...

🎉 Server is up and running!
📡 The Websockets server is available at 127.0.0.1:6001
🔗 The HTTP API server is available at http://127.0.0.1:6001
🎊 The /usage endpoint is available on port 9601. `

And run. But it would be interesting to update Soketi.
Happy New Year!

@ultrafro
Copy link

ultrafro commented Feb 9, 2023

not sure if useful, but was able to work around this by doing:
npm install pm2@latest -g

@JJ
Copy link

JJ commented May 4, 2023

Now opencensus itself is EOL. It's been subsumed by openTelemetry, apparently.

@devchaeyoung
Copy link

I resolved this Problem already now!
I tried for this problem.

  1. Delete file .zshrc
  2. I made .zshrc using nano
  3. I copied already .zshrc contents and pasted editing nano .zshrc
  4. again update npm i -g npm or used source .zshrc
  5. You can typing pm2 in terminal or whereis pm2
  6. You can checking pm2 : path-way

This's just my solution. I hope it helps for this problem.

@runev-admin
Copy link

not sure if useful, but was able to work around this by doing: npm install pm2@latest -g

This does not work

@Chiroyce1
Copy link

@Unitech there is no way this hasn't been resolved almost 2.5 years later?

~ $ node --version
v21.5.0
~ $ npm --version
8.6.0
~ $ # latest node and npm versions
~ $ npm install pm2@latest -g
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  
Older versions may use Math.random() in certain circumstances, which is known to be problematic.  
See https://v8.dev/blog/math-random for details.

added 158 packages, and audited 159 packages in 14s

13 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

@ksimaster
Copy link

Испробовал несколько способов. Обновил uuid до последнего, почистил кэш(npm clean cash), затем с сайта: https://pm2.io/docs/runtime/guide/installation/ взял команду: npm install pm2 -g && pm2 update
У меня запустилось и заработало. Попробуйте! Может кому-то тоже поможет

@Unitech
Copy link
Owner

Unitech commented May 24, 2024

Feature landed

Update PM2 to 5.4.0

$ npm install pm2@5.4.0 -g
$ pm2 update

@Unitech Unitech closed this as completed May 24, 2024
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