|
| 1 | +# Known Deprecation Warnings |
| 2 | + |
| 3 | +## DEP0060: util._extend Deprecation Warning |
| 4 | + |
| 5 | +When running the frontend development server with `yarn start:stage`, you may encounter the following deprecation warning: |
| 6 | + |
| 7 | +```code |
| 8 | +(node:xxxxx) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead. |
| 9 | + at ProxyServer.<anonymous> (/Users/.../node_modules/http-proxy/lib/http-proxy/index.js:50:26) |
| 10 | + at HttpProxyMiddleware.middleware (/Users/.../node_modules/http-proxy-middleware/dist/http-proxy-middleware.js:22:32) |
| 11 | +``` |
| 12 | + |
| 13 | +### What causes this warning? |
| 14 | + |
| 15 | +This warning originates from the `[email protected]` library, which is a transitive dependency used by: |
| 16 | + |
| 17 | +- `[email protected]` (our dev dependency) |
| 18 | +- `[email protected]` (dependency of webpack-dev-server) |
| 19 | + |
| 20 | +The `http-proxy` library still uses the deprecated `util._extend()` API instead of the modern `Object.assign()`. |
| 21 | + |
| 22 | +### Is this harmful? |
| 23 | + |
| 24 | +**No, this warning is completely harmless:** |
| 25 | + |
| 26 | +- The functionality works exactly the same |
| 27 | +- `util._extend()` still functions correctly in all supported Node.js versions |
| 28 | +- This is purely a deprecation notice, not an error |
| 29 | +- It does not affect the application's functionality or performance |
| 30 | + |
| 31 | +### When will this be fixed? |
| 32 | + |
| 33 | +This will be resolved when: |
| 34 | + |
| 35 | +1. The upstream `http-proxy` library is updated to use `Object.assign()` instead of `util._extend()` |
| 36 | +2. OR when `webpack-dev-server` switches to a different proxy implementation |
| 37 | +3. OR when we upgrade to newer versions that have resolved this issue |
| 38 | + |
| 39 | +### React 19 Compatibility |
| 40 | + |
| 41 | +This deprecation warning will not prevent upgrading to React 19 or any future React versions, as it's unrelated to React and only affects the development server's proxy functionality. |
| 42 | + |
| 43 | +### Alternative Solutions Considered |
| 44 | + |
| 45 | +1. **Patching the library**: We could patch `http-proxy` to use `Object.assign()`, but this adds maintenance overhead |
| 46 | +2. **Suppressing warnings**: We could use `NODE_OPTIONS='--no-deprecation'` to hide all deprecation warnings, but this might hide other important warnings |
| 47 | +3. **Yarn resolutions**: We could try to force a different version, but `1.18.1` is already the latest |
| 48 | + |
| 49 | +For now, we've decided to leave the warning visible as it's informational and doesn't impact functionality. |
0 commit comments