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

Deprecation warnings when using node v22 #1058

Open
2 tasks done
art-alexeyenko opened this issue Nov 13, 2024 · 0 comments
Open
2 tasks done

Deprecation warnings when using node v22 #1058

art-alexeyenko opened this issue Nov 13, 2024 · 0 comments

Comments

@art-alexeyenko
Copy link

art-alexeyenko commented Nov 13, 2024

Checks

Describe the bug (be clear and concise)

The (node:31680) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead warning message occurs when using http-proxy-middleware after upgrading nodejs to version 22.9. The warning originates in http-proxy dependendency:

    at ProxyServer.<anonymous> (...\node_modules\http-proxy\lib\http-proxy\index.js:50:26)
    at HttpProxyMiddleware.middleware (...\node_modules\http-proxy-middleware\dist\http-proxy-middleware.js:23:32)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)

Step-by-step reproduction instructions

1. Update your machine to use the latest version of node (22.9.0 at the time of writing) 
2. Configure an express app to use `http-proxy-middleware` proxy to intercept requests (any requests)
3. Start the app, and trigger a request to be intercepted

The Warning will appear in server logs.

Expected behavior (be clear and concise)

No warning in logs.

How is http-proxy-middleware used in your project?

We intercept API calls to the server endpoint and conditionally modify the response.

What http-proxy-middleware configuration are you using?

createProxyMiddleware({
    // our custom endpoint
    target: graphQLEndpoint.target,
    changeOrigin: true,
    selfHandleResponse: true,
    on: {
      proxyReq: fixRequestBody,
    },
    // our custom plugin
    plugins: [personalizePlugin],
  })


### What OS/version and node/version are you seeing the problem?

```shell
Windows 11
Nodejs 22.9
npm 10.9

Additional context (optional)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant