How to configure proxy with user and password in Ionic?

Asked

Viewed 53 times

1

I’m trying to configure the Ionic proxy to download projects here in the company but something is wrong.

In npm the proxy is set and works well (see file .npmrc):

proxy=http://DOMINIO%5CUSUARIO:00000%[email protected]:8080

As you can see the proxy has user and password and works perfectly, all dependencies are being downloaded.

When I set up the file config.json of Ionic as below, returns me a connection error.

{
  "version": "5.4.5",
  "telemetry": true,
  "npmClient": "npm",
  "tokens.telemetry": "40adsfasd-cff7-4dfsf-a760-5asdfasdbsdaf",
  "proxy": "http://DOMINIO%5CUSUARIO:00000%[email protected]:8080"  
}

Evidence of error:

C:\Temp\angular
> ionic start testeapp blank

Pick a framework!

Please select the JavaScript framework to use for your new app. To bypass this prompt next time, supply a value for the
--type option.

? Framework: Angular
√ Preparing directory .\testeapp - done!
- Downloading and extracting blank starter (45.40%)
Error: Encountered bad status code (407) for https://d2ql0qc7j8u4b2.cloudfront.net/angular-official-blank.tar.gz

This could mean the server is experiencing difficulties right now--please try again later.
at Request.req.on.res (C:\Users\USUARIO\AppData\Roaming\npm\node_modules\ionic\lib\utils\http.js:64:24)
at Request.emit (events.js:189:13)
at Request._emitResponse
(C:\Users\USUARIO\AppData\Roaming\npm\node_modules\ionic\node_modules\superagent\lib\node\index.js:862:8)
at ClientRequest.req.once.res
(C:\Users\USUARIO\AppData\Roaming\npm\node_modules\ionic\node_modules\superagent\lib\node\index.js:412:10)
at Object.onceWrapper (events.js:277:13)
at ClientRequest.emit (events.js:194:15)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
at Socket.socketOnData (_http_client.js:442:20)
/ Downloading and extracting blank starter (45.40%)

Anyone can help?

No answers

Browser other questions tagged

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