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

[DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead. #26904

Closed
4 tasks
patrickhammond opened this issue Jul 11, 2024 · 10 comments · Fixed by #28094
Closed
4 tasks
Assignees
Labels
scope: core core nx functionality type: bug

Comments

@patrickhammond
Copy link

Current Behavior

When using Node 22.x, some nx commands that use the run-many option show this warning. Ex: nx run-many -t serve. Running the same command against a specific app does not show the warning. Ex: nx serve app.

(node:77945) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Documentation on the warning:
https://nodejs.org/docs/latest-v22.x/api/deprecations.html#DEP0060

Expected Behavior

nx commands that result in forked processes should be able to be run without warnings.

GitHub Repo

No response

Steps to Reproduce

  1. Use any version of Node 22.x.
  2. Use any recent version of nx with a simple Fastify server.
  3. Start up a server using nx run-many -t serve
  4. Observe the displayed deprecation warning.

Nx Report

NX   Report complete - copy this into the issue template

Node   : 22.4.1
OS     : linux-arm64
npm    : 10.8.1

nx                 : 19.4.2
@nx/js             : 19.4.2
@nx/jest           : 19.4.2
@nx/linter         : 19.4.2
@nx/eslint         : 19.4.2
@nx/workspace      : 19.4.2
@nx/devkit         : 19.4.2
@nx/esbuild        : 19.4.2
@nx/eslint-plugin  : 19.4.2
@nx/node           : 19.4.2
@nrwl/tao          : 19.4.2
typescript         : 5.5.3
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/jest/plugin

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Running node --trace-warnings node_modules/.bin/nx run-many -t serve to trace out the source of the warning shows this:

(node:74883) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
    at Logger (/project/node_modules/strong-log-transformer/lib/logger.js:32:18)
    at /project/node_modules/nx/src/tasks-runner/forked-process-task-runner.js:219:39
    at new Promise (<anonymous>)
    at ForkedProcessTaskRunner.forkProcessWithPrefixAndNotTTY (/project/node_modules/nx/src/tasks-runner/forked-process-task-runner.js:181:16)
    at ForkedProcessTaskRunner.forkProcess (/project/node_modules/nx/src/tasks-runner/forked-process-task-runner.js:119:25)
    at TaskOrchestrator.runTaskInForkedProcess (/project/node_modules/nx/src/tasks-runner/task-orchestrator.js:286:54)
    at TaskOrchestrator.applyFromCacheOrRunTask (/project/node_modules/nx/src/tasks-runner/task-orchestrator.js:269:61)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async TaskOrchestrator.executeNextBatchOfTasksUsingTaskSchedule (/project/node_modules/nx/src/tasks-runner/task-orchestrator.js:77:13)
    at async Promise.all (index 0)

The strong-log-transformer dependency is coming from:

"strong-log-transformer": "^2.1.0",

This appears to be its only usage in nx:

import * as logTransformer from 'strong-log-transformer';

@FrozenPandaz FrozenPandaz added the scope: core core nx functionality label Jul 16, 2024
dyeon-dev referenced this issue in dyeon-dev/boiler-plate Aug 19, 2024
cors 이슈 및 proxy 설정x(에러발생)
cors 패키지로 express에 설정해줌
@Yberion
Copy link

Yberion commented Aug 25, 2024

Same problem

@plaskowski-bqs
Copy link

In newest version still appear... This strong-log-transformer lib is not updated from 2018... but somebody prepared a fix, which waiting to CR...

@guiseek
Copy link
Contributor

guiseek commented Sep 5, 2024

the same thing happens here

@MacFinter
Copy link

MacFinter commented Sep 14, 2024

actual for me
(node:59326) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead.

@saeidi-dev
Copy link

I have this problem

(node:21492) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

@Yaoghost
Copy link

Has anybody found a solution?

@bkhtbkid
Copy link

I had this error. I changed the node version to a lower version and everything worked

@xiongemi
Copy link
Collaborator

as mentioned above, it is caused by strongloop/strong-log-transformer#12. need to wait for strong-log-transformer to update

@xiongemi
Copy link
Collaborator

i submitted a pr to remove package strong-long-transfromer from nx's package's dependencies

@whs0809
Copy link

whs0809 commented Oct 15, 2024

My node version 22.2 reported this error, I reduced the node version to 18.20 and started again to solve the problem.Should be too high version caused by incompatibility?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: core core nx functionality type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.