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 Warning] Node's DEP0060 when using proxy config and entering a URL target. #27639

Closed
cyraid opened this issue May 14, 2024 · 1 comment

Comments

@cyraid
Copy link

cyraid commented May 14, 2024

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

No

Description

Overview

Node's DEP0060 when using proxy config and entering a URL target.

Details

After using a proxy (set with options in @angular-devkit/build-anger:dev-server):

        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "proxyConfig": "proxy.conf.json"
          },

Inside proxy.conf.json using a simple proxy config:

{
  "/api": {
    "target": "http://localhost:8080",
    "secure": false,
    "pathRewrite": {
      "^/api": ""
    }
  }
}

Will result in:

(node:8703) [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 you visit http://localhost:4200/api.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

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


### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 17.3.2
Node: 22.0.0 (Unsupported)
Package Manager: npm 10.5.1
OS: linux x64

Angular: 17.3.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.2
@angular-devkit/build-angular   17.3.2
@angular-devkit/core            17.3.2
@angular-devkit/schematics      17.3.2
@schematics/angular             17.3.2
rxjs                            7.8.1
typescript                      5.4.3
zone.js                         0.14.4

Anything else?

I realize Angular doesn't support Node 22.0.0 yet, but I figure this may be a help on the right track to fix some future issues if someone likes. I'll use a supported Node in the meantime.

@JeanMeche JeanMeche transferred this issue from angular/angular May 14, 2024
@alan-agius4
Copy link
Collaborator

This has been fixed in the version 18 which is currently in release candidate.

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

2 participants