8000 DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead. · Issue #74460 · vercel/next.js · GitHub
[go: up one dir, main page]

Skip to content
DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead. #74460
@kuanjiahong

Description

@kuanjiahong

Link to the code that reproduces this issue

https://github.com/kuanjiahong/deprecation-warning-app

To Reproduce

Development mode

  1. Start the application in development npm run dev
  2. Go to http://localhost:3000
  3. Click the button to rewrite the url
  4. Check the console for the deprecation warning

Deployment - Node.js Server

  1. Build the application npm run build
  2. Run the application npm run start
  3. Go to http://localhost:3000
  4. Click the button to rewrite the url
  5. Check the console for the deprecation warning

Deployment - Docker image

  1. Build container docker build -t nextjs-docker .
  2. Run container: docker run -p 3000:3000 nextjs-docker
  3. Go to http://localhost:3000
  4. Click the button to rewrite the url
  5. Check the console for the deprecation warning

Current vs. Expected behavior

Current behaviour:

A deprecation warning is shown:

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

When used node --trace-deprecation to show where the warning was created:

(node:1) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
    at ProxyServer.<anonymous> (/app/node_modules/next/dist/compiled/http-proxy/index.js:13:2607)
    at proxyRequest (/app/node_modules/next/dist/server/lib/router-utils/proxy-request.js:108:15)
    at handleRequest (/app/node_modules/next/dist/server/lib/router-server.js:332:61)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async requestHandlerImpl (/app/node_modules/next/dist/server/lib/router-server.js:441:13)
    at async Server.requestListener (/app/node_modules/next/dist/server/lib/start-server.js:155:13)

Expected behaviour:
No deprecation warning.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Enterprise
  Available memory (MB): 32562
  Available CPU cores: 8
Binaries:
  Node: 22.12.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.1.1-canary.23 // Latest available version is detected (15.1.1-canary.23).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.3.3
Next.js Config:
  output: standalone

Which area(s) are affected? (Select all that apply)

Runtime

Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local), Other (Deployed)

Additional context

I found these related issue: #72220 #71374

I found that this issue start to occur when using Node version >= 22.

This issue does not occur when using Node v20.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RuntimeRelated to Node.js or Edge Runtime with Next.js.linear: nextConfirmed issue that is tracked by the Next.js team.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0