0

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:

proxy

How do I completely resolve all errors, ang Angular project installed?

Thanks

midowu
  • 937
  • 5
  • 19
  • 40
  • Clear npm cache and try again "npm cache clear --force" – Kannan Thangadurai Mar 19 '22 at 18:10
  • Can you able to open https://registry.npmjs.org/ in your browser? – rohithpoya Mar 20 '22 at 05:57
  • Yes @rohithpoya - I got this: {"db_name":"registry","engine":"couch_bt_engine","doc_count":2740346,"doc_del_count":334,"update_seq":16038752,"purge_seq":0,"compact_running":false,"sizes":{"active":50288079602,"external":161731056984,"file":50400137456},"disk_size":50400137456,"data_size":50288079602,"other":{"data_size":161731056984},"instance_start_time":"1647647021618067","disk_format_version":7,"committed_update_seq":16038752,"compacted_seq":16038242,"uuid":"964c127ddcbbd59982db896a0f9e8a99"} – midowu Mar 20 '22 at 06:04

2 Answers2

0

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

Nader
  • 190
  • 9
  • I checked my system and I am not behind a proxy. This did not work: npm cache clear --force. See the updated post. I added the screenshot – midowu Mar 20 '22 at 05:46
0

Use,

npm config set registry http://registry.npmjs.org/

then run npm install

rohithpoya
  • 865
  • 7
  • 20