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

DeprecationWarning: The util._extend API is deprecated #301

Closed
eskylake opened this issue May 11, 2024 · 2 comments · Fixed by #303
Closed

DeprecationWarning: The util._extend API is deprecated #301

eskylake opened this issue May 11, 2024 · 2 comments · Fixed by #303

Comments

@eskylake
Copy link

Hi. Many tnx to PM2.
I am using:

System:
  OS: Linux 6.5 Alpine Linux
  Container: Yes
Binaries:
  Node: 22.1.0
  Yarn: 1.22.19

I am getting DeprecationWarning while running pm2-runtime start pm2.config.js.
I found an issue related to the problem.
Here is the stack trace:

"DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.\nat Function.init (/app/api/node_modules/@pm2/io/src/configuration.ts:114:31)\nat PMX.init (/app/api/node_modules/@pm2/io/src/pmx.ts:145:19)\nat Object.<anonymous> (/app/api/node_modules/@pm2/io/src/index.ts:7:67)\nat Module._compile (node:internal/modules/cjs/loader:1480:14)\nat Object.Module._extensions..js (node:internal/modules/cjs/loader:1564:10)\nat Module.load (node:internal/modules/cjs/loader:1287:32)\nat Function.Module._load (node:internal/modules/cjs/loader:1103:12)\nat Module.require (node:internal/modules/cjs/loader:1310:19)\nat require (node:internal/modules/helpers:179:18)\nat Object.injectModules (/app/api/node_modules/pm2/lib/ProcessUtils.js:6:19)"

So I found some util['_extend']() calls in src/configuration.ts which aren't changed yet.
I'm happy to open a PR.

@enkr1
Copy link

enkr1 commented Jun 5, 2024

any updates...

@egoroof
Copy link
Contributor

egoroof commented Jul 3, 2024

Have same issue on node 22.4.0. Here is stack trace:

[DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
at Configuration.init (/root/.nvm/versions/node/v22.4.0/lib/node_modules/pm2/node_modules/@pm2/io/build/main/configuration.js:101:39)
at PMX.init (/root/.nvm/versions/node/v22.4.0/lib/node_modules/pm2/node_modules/@pm2/io/build/main/pmx.js:87:33)
at Object.<anonymous> (/root/.nvm/versions/node/v22.4.0/lib/node_modules/pm2/node_modules/@pm2/io/build/main/index.js:5:65)
at Module._compile (node:internal/modules/cjs/loader:1467:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1551:10)
at Module.load (node:internal/modules/cjs/loader:1282:32)
at Module._load (node:internal/modules/cjs/loader:1098:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
at Module.require (node:internal/modules/cjs/loader:1304:12)

Should be fixed in #303

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

Successfully merging a pull request may close this issue.

3 participants