Hi I'm installing angular on my pc (ub
with the following command sudo npm install -g @angular/cli
I have
npm -v 6.10.1
node -v v12.6.0
and it generates the following error
sudo npm install -g @angular/cli
sudo: imposible resolver el anfitrión P8534
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://registry.npmjs.org/@angular%2fcli failed, reason: write EPROTO 139783343089472:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /home/desarrollo/.npm/_logs/2019-07-16T20_21_44_897Z-debug.log
Additionally, I tried to do an npm cache clear and I got the following error:
As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent,
use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use
`npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
If someone can guide me on how to fix it, thank you very much!
I was able to solve it by running the following command
npm install --cache /tmp/empty-cache
Also, if you work in a place with a proxy, don't forget to configure: