Npm install proxy error

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

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

I've tried putting http and https in both, but the proxy keeps barring...

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
Author: Fanton Lord, 2019-09-26

1 answers

You need to create a system environment variable to be able to use the Internet from 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%

From the windows interface can also do this way:

1- search on Start Editar as variáveis de ambiente do sistema
2- click the button Variáveis de Ambiente
3- Variáveis do Usuário or Variáveis do Sistema Click the Novo...
(Depending on the situation. Only you use the PC? So it can be Variáveis do Sistema)
4- name of variable= HTTP_PROXY variable value= http://usuario:senha@IP_ou_DNS:porta

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

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

 0
Author: SakuraFreak, 2019-09-26 18:21:53