For some days now I have been trying to install Angular-13 on my windows-10 without any success:
ng --version
gives me:
Angular CLI: 13.3.0
Node: 16.14.2
Package Manager: npm 8.5.0
OS: win32 x64
Angular: undefined
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1303.0 (cli-only)
@angular-devkit/core 13.3.0 (cli-only)
@angular-devkit/schematics 13.3.0 (cli-only)
@schematics/angular 13.3.0 (cli-only)
but when I did ng new my-project, I got this error:
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/cacache: Socket timeout
then I did:
npm cache clean --force
npm config set fetch-retry-mintimeout 20000
npm config set fetch-retry-maxtimeout 120000
npm install
the error changed to:
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
Just moving from one error to the other.
Proxy is not setup:
How do I completely resolve all errors, ang Angular project installed?
Thanks
CodePudding user response:
Looks like network error, you can try:
check internet access.
if you are behind a proxy check this answer for npm proxy settings proxy settings
Clean npm cache npm cache clear --force
CodePudding user response:
Use,
npm config set registry http://registry.npmjs.org/
then run npm install