Proxy error npm install

Asked

Viewed 699 times

0

I installed Nodejs and Angular, went to the prompty and tried to run npm install in my project folder, however, even after I set up the proxy with:

npm config set proxy "http://[user]:[password]@[ip]:[port]"
npm config set https-proxy "https://[user]:[password]@[ip]:[port]"

I’ve tried to put http and https on both, but the proxy keeps blocking...

I’m using Windows 10

npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EPROTO: request to https://registry.npmjs.org/fsevents failed, reason: write EPROTO 15260:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\\ws\\deps\\openssl\\openssl\\ssl\\record\\ssl3_record.c:332:\n
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.

> [email protected] postinstall C:\Users\joao.cruz\Desktop\angular-2-boilerplate-master
> typings install

typings ERR! message Unable to connect to "https://api.typings.org/entries/dt/core-js/tags/0.0.0%2B20160602141332"
typings ERR! caused by write EPROTO 9144:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:
typings ERR! caused by
typings ERR!
typings ERR! cwd C:\Users\joao.cruz\Desktop\angular-2-boilerplate-master
typings ERR! system Windows_NT 10.0.17134
typings ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\joao.cruz\\Desktop\\angular-2-boilerplate-master\\node_modules\\typings\\dist\\bin.js" "install"
typings ERR! node -v v10.16.3
typings ERR! typings -v 1.5.0
typings ERR! code EUNAVAILABLE
typings ERR!
typings ERR! If you need help, you may report this error at:
typings ERR!   <https://github.com/typings/typings/issues>
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `typings install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\joao.cruz\AppData\Roaming\npm-cache\_logs\2019-09-26T15_41_52_866Z-debug.log

1 answer

0

You need to create a system environment variable in order to use the internet via the Windows terminal.

Start the terminal as admin and type:

set HTTP_PROXY=http://usuario:senha@IP_ou_DNS:porta
set FTP_PROXY=%HTTP_PROXY%
set HTTPS_PROXY=%HTTP_PROXY%

By windows interface can also do so:

1- Search at start Editar as variáveis de ambiente do sistema
2- Click on the button Variáveis de Ambiente
3- Variáveis do Usuário or Variáveis do Sistema click the button Novo...
(Dependent on the situation. Only you use the PC? Then it can be Variáveis do Sistema)
4- Variable name= HTTP_PROXY Variable Value= http://usuario:password@IP_ou_DNS:port

Note that special characters (@, #, $) should be represented as HTML character code
Example: @ = %40

http://www.obkb.com/dcljr/charstxt.html

  • Restart the machine after this procedure?

  • Nope.jpeg. Just open a new terminal

Browser other questions tagged

You are not signed in. Login or sign up in order to post.