-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Labels
RuntimeRelated to Node.js or Edge Runtime with Next.js.Related to Node.js or Edge Runtime with Next.js.linear: nextConfirmed issue that is tracked by the Next.js team.Confirmed issue that is tracked by the Next.js team.
Description
Link to the code that reproduces this issue
https://github.com/kuanjiahong/deprecation-warning-app
To Reproduce
Development mode
- Start the application in development
npm run dev
- Go to
http://localhost:3000
- Click the button to rewrite the url
- Check the console for the deprecation warning
Deployment - Node.js Server
- Build the application
npm run build
- Run the application
npm run start
- Go to
http://localhost:3000
- Click the button to rewrite the url
- Check the console for the deprecation warning
Deployment - Docker image
- Build container
docker build -t nextjs-docker .
- Run container:
docker run -p 3000:3000 nextjs-docker
- Go to
http://localhost:3000
- Click the button to rewrite the url
- 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.
kachkaev, BlueManCZ, artur-ptaszek-mck, Strutsagget, ViniciusLima7 and 16 moremstade, ohprettyhak, uowis-confetti and Anton-L-Ext
Metadata
Metadata
Assignees
Labels
RuntimeRelated to Node.js or Edge Runtime with Next.js.Related to Node.js or Edge Runtime with Next.js.linear: nextConfirmed issue that is tracked by the Next.js team.Confirmed issue that is tracked by the Next.js team.