Angular-cli: 6.0.0-rc.3 'ng update' does not work beyond the proxy due to 'Error: connect ECONNREFUSED 151.101.0.162:80'

Created on 12 Apr 2018  路  16Comments  路  Source: angular/angular-cli

Versions

Angular CLI: 6.0.0-rc.3
Node: 8.9.1
OS: win32 x64
Angular: 6.0.0-rc.3
... animations, cli, common, compiler, core, forms, http
... platform-browser, platform-browser-dynamic, router

@angular/cdk: 6.0.0-rc.2
@angular/compiler-cli: 5.2.9
@angular/flex-layout: 5.0.0-beta.13
@angular/language-service: 5.2.9
@angular/material: 6.0.0-rc.2
@angular-devkit/architect: 0.5.5
@angular-devkit/core: 0.5.5
@angular-devkit/schematics: 0.5.5
@ngtools/json-schema: 1.1.0
@schematics/angular: 0.5.5
@schematics/update: 0.5.5
typescript: 2.6.2
webpack: error

Repro steps

Upgrade the deps in the current project (including node_modules complete reinstall)
run npm run ng -- update - this command need to be run to generate angular.json as per release notes https://github.com/angular/angular-cli/releases/tag/v6.0.0-rc.2

Observed behavior

Giving an error:

> ng "update"

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

Error: connect ECONNREFUSED 151.101.0.162:80
    at Object._errnoException (util.js:1024:11)
    at _exceptionWithHostPort (util.js:1046:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)

Desired behavior

Should produce the angular.json file

Mention any other details that might be useful (optional)

Related issue https://github.com/angular/angular-cli/issues/10241 has being closed for some reason

2 (required)

Most helpful comment

+1

All 16 comments

That other issue has been closed because this is fixed by adding a --registry flag to ng update.

This issue is about using a corporate proxy which is not supported. It should be.

I'm having the same issue and also behind a corporate proxy.
Had to downgrade back to the 1.7.4 to resolve the issue.

Doesn't seem to be using npm to make the connection as I have a proxy setting in my .npmrc file.

registry=http://registry.npmjs.org
proxy=http://127.0.0.1:8888
https-proxy=http://127.0.0.1:8888
http-proxy=http://127.0.0.1:8888
strict-ssl=false

ng update @angular/cli --migrate-only --from=1.7.4 --registry=http://proxy.host.it:9999

Unexpected token < in JSON at position 1

# Versions

Angular CLI: 6.0.0-rc.2
Node: 8.11.1
OS: win32 x64
Angular: 6.0.0-rc.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 6.0.0-rc.2
@angular-devkit/architect: 0.5.4
@angular-devkit/core: 0.5.4
@angular-devkit/schematics: 0.5.4
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 6.0.0-rc.4
@schematics/angular: 0.5.6
@schematics/update: 0.5.4
typescript: 2.9.0-dev.20180411
webpack: 4.5.0

The current version only supports custom registries. Proxy support is in progress and should available in the next RC.

+1
We have to use a corporate proxy :-(
Support for Proxy in update command would be great!

+1
We too have a corporate proxy. And the update command fails.

Resolved via angular/devkit#692 and will be in the next release.

If I update the to cli 6 manually and then after running ng update I am not getting the anguler.json created. Just had to migrate the cli config manually.

Stuck with the same issue and can't update to Angular 6 :(

+1

+1 behind corporate proxy

+1

A short-term solution: install proxychains, configure your proxy, and run whatever command you were attempting through that tool. If you're getting DNS errors from proxychains, make sure the proxy_dns option is commented out in the /etc/proxychains.conf file (most organizations won't block DNS queries anyway).

+1

You can use
ng update @angular/cli --registry=http://registry.npmjs.org
It will bypass proxy

Also make sur in your .npmrc to set the proxy settings

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings