You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After doing an "npm update" I now get the following error when I run "npx netlify dev":
(node:28848) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead.
(Use node --trace-deprecation ... to show where the warning was created)
I can still deploy without issues but this is preventing me from full local testing. I can still use "npm run dev" and still work with some things.
After doing some digging with @tlane25, we were able to pinpoint the cause of this error.
The deprecation warning you're seeing is indeed coming from the http-proxy library, which is a dependency used by Netlify CLI. I've investigated the issue, and I can provide some additional context:
Root cause:
The warning is due to the use of the deprecated util._extend API in the http-proxy library.
var httpProxy assignment on line 2 of http-proxy/lib/http-proxy/index.js where extend is assigned to the depreciated util._extend.
The issue stems from line 2 in the code below from http-proxy/lib/http-proxy/index.js.
utils._extend is depreciated and should be replaced with Object.assign().
This PR replaces the usage of util._extend with Object.assign(), which should resolve the deprecation warning. The PR has been opened and is waiting to be reviewed and merged by the maintainers of the http-proxy library.
Workaround
The Node.js deprecation warning only seems to appear on versions of Node.js greater than 20. The warnings do not appear on Node.js version 20.18.0, but they do appear on your version (22.3.0). You can try using Node.js 20.18.0 to avoid the warning.
Furthermore if you need to use Node.js 22 or higher, you can try suppressing the warnings by doing the following.
Describe the bug
After doing an "npm update" I now get the following error when I run "npx netlify dev":
(node:28848) [DEP0060] DeprecationWarning: The
util._extend
API is deprecated. Please use Object.assign() instead.(Use
node --trace-deprecation ...
to show where the warning was created)I can still deploy without issues but this is preventing me from full local testing. I can still use "npm run dev" and still work with some things.
Steps to reproduce
I just ran an "npm update".
Configuration
[functions]
external_node_modules = ["aws-sdk"]
[functions."flowpiechart"]
included_files = ["languages/**"]
[functions."review"]
included_files = ["languages/**"]
[functions."test"]
[dev]
targetPort = 4000
[functions."wb-sync-background"]
schedule = "@daily"
[[plugins]]
package = "@netlify/plugin-nextjs"
Environment
System:
OS: Windows 11 10.0.22631
CPU: (12) x64 AMD Ryzen 5 3600X 6-Core Processor
Memory: 14.13 GB / 31.93 GB
Binaries:
Node: 22.3.0 - C:\Program Files\nodejs\node.EXE
npm: 10.8.3 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.10.0 - ~\AppData\Local\pnpm\pnpm.EXE
npmPackages:
netlify-cli: ^17.36.2 => 17.36.2
The text was updated successfully, but these errors were encountered: