我正在尝试使用“ ng update @ angular / cli”命令将我的angular-cli版本从1.7.4升级到版本8.3.8,但出现以下错误:
Your global Angular CLI version (8.3.8) is greater than your local
version (1.7.4). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
events.js:174
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:80
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
Emitted 'error' event at:
at Socket.socketErrorListener (_http_client.js:392:9)
at Socket.emit (events.js:189:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
我正在代理下运行,我猜它配置正确,因为NPM运行良好。我正在升级客户端,以便将应用程序从5角度迁移到6(然后从6迁移到7并从7迁移到8)。我正在按照官方角度网站提供的步骤进行操作,但我坚持执行此步骤(升级角度cli)。
答案 0 :(得分:-1)
首先更新Angular CLI
npm install -g @angular/cli@latest
https://www.npmjs.com/package/@angular/cli/v/7.0.2#updating-angular-cli
选中此issue & answer。