我尝试使用此命令将Angular2更新为Angular 4:
npm install @angular/common@latest @angular/compiler@latest @angular/compiler-cli@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest @angular/animations@latest typescript@latest --save
并显示此错误:
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read
npm ERR! network read ECONNRESET
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! shasum check failed for C:\Windows\temp\npm-3816-28e571ea\registry.npmjs.org\typescript\-\typescript-2.4.1.tgz
npm ERR! Expected: c3ccb16ddaa0b2314de031e7e6fee89e5ba346bc
npm ERR! Actual: e123d8d94948e846a2c38ac3ffea38ea349ec2ec
npm ERR! From: https://registry.npmjs.org/typescript/-/typescript-2.4.1.tgz
npm ERR! A complete log of this run can be found in:
npm ERR! C:\U\Ov15\AppData\Roaming\npm-cache\_logs\2017-07-07T02_21_38_894Z-debug.log
任何人都可以帮助我吗?
答案 0 :(得分:0)
您是否设置了npm代理?
npm config set http-proxy http://username:password@ip:port
npm config set https-proxy http://username:password@ip:port