angular-cli: ng update error: Error: getaddrinfo ENOTFOUND

Versions

Angular CLI: 1.7.0
Node: 8.9.3   
OS: win32 x64
Angular: 5.2.1
... animations, common, compiler, compiler-cli, core, forms        
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 5.1.0                                                           
@angular/cli: 1.7.0
@angular/material: 5.1.0                                                     
@angular-devkit/build-optimizer: 0.3.1                                   
@angular-devkit/core: 0.3.1                                                      
@angular-devkit/schematics: 0.3.1
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.0
@schematics/angular: 0.3.1
@schematics/package-update: 0.3.1
typescript: 2.5.3
webpack: 3.11.0

Repro steps

  • Step 1 run ng update

Observed behavior

following error is thrown

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:80
    at errnoException (dns.js:50:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)

Desired behavior

It should properly update the dependencies

Mention any other details that might be useful (optional)

Running this behind a corporate proxy. Does ng update take that into consideration?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 10
  • Comments: 19 (3 by maintainers)

Most upvoted comments

The issue still persists with v^6.0.0

With the latest release of Angular, we are in desperate need of ng update to work in our environments. Can this issue be addressed on priority?

The flag should be on the update function itself 😃 We contact the npm registry directly, not passing through npm API, so there’s nowhere you can set that proxy right now.

👍 Some of us corporate folks maintain our own registry that we use instead of the main npm registry, but even still, it doesn’t seem to honor the http-proxy values