pm2
pm2 copied to clipboard
pm2 install gives WARN deprecated [email protected]: Please upgrade to version 7 or higher.
What's going wrong?
root@myhost:~# npm install pm2 -g
npm WARN deprecated [email protected]: 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:
- Install Node 12
- Upgrade npm using
npm install -g npm - 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: ===============================================================================
same issue
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.
This library uses too many old dependencies. Is no one maintaining it anymore?
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.
@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
https://github.com/keymetrics/pm2-io-apm/pull/287
But it was not approved yet because it has conflicts
any update ?
any update ?
@thecertifiednoob
There is an issue for the problem:
- https://github.com/keymetrics/pm2-io-apm/issues/285
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.
+1 here when is solved?
Using node 16:
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
@Unitech Could you please leave some information here? This 3-year old deprecated module should be updated imo.
Same here. Hope to hear your expertise on the issue.
@Unitech Any update on this issue? It's too outdated. Hope to hear from you guy soon
warning pm2 > @pm2/io > @opencensus/propagation-b3 > [email protected]: 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 > [email protected]: 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 > [email protected]: 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 [email protected]: 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.
npm install -g @soketi/soketi
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: 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 [email protected]: 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
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.
I downloaded the version of node 8.19.2
npm -v 8.19.2
`npm install -g @soketi/soketi
npm WARN deprecated [email protected]: 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 [email protected]: 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 [email protected]: 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!
not sure if useful, but was able to work around this by doing:
npm install pm2@latest -g
Now opencensus itself is EOL. It's been subsumed by openTelemetry, apparently.
I resolved this Problem already now! I tried for this problem.
- Delete file
.zshrc - I made
.zshrcusing nano - I copied already
.zshrccontents and pasted editing nano.zshrc - again update
npm i -g npmor usedsource .zshrc - You can typing
pm2in terminal orwhereis pm2 - You can checking pm2 : path-way
This's just my solution. I hope it helps for this problem.
not sure if useful, but was able to work around this by doing:
npm install pm2@latest -g
This does not work
@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 [email protected]: 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
Испробовал несколько способов. Обновил uuid до последнего, почистил кэш(npm clean cash), затем с сайта: https://pm2.io/docs/runtime/guide/installation/ взял команду: npm install pm2 -g && pm2 update У меня запустилось и заработало. Попробуйте! Может кому-то тоже поможет