0

I am following these three commands, but it still resulted in an error.

#npm config set https-proxy http://proxy.company.com:8080
#npm config set http_proxy=http://domain:8080

After these command before ran two commands.

#npm config set proxy http://domain:8080
#npm rebuild node-sass
#npm install
#ionic serve

Error:
```none
Admins-Mac-mini-5:~ techwinlabs$ sudo npm install -g cordova ionic
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.npmjs.org/cordova failed, 
reason: getaddrinfo ENOTFOUND proxy.company.com proxy.company.com:8080
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network 
settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/techwinlabs/.npm/_logs/2020-07-15T08_06_22_790Z-debug.log
  • for http its `set proxy` not `set http_proxy` – Krzysztof Krzeszewski Jul 15 '20 at 08:24
  • 3
    Does this answer your question? [Is there a way to make npm install (the command) to work behind proxy?](https://stackoverflow.com/questions/7559648/is-there-a-way-to-make-npm-install-the-command-to-work-behind-proxy) – Krzysztof Krzeszewski Jul 15 '20 at 08:24
  • @Krzysztof Krzeszewski Thanks for Answer but in this Link there is alot answers so plz tell me which will have best for this problem – Sandeep Ambedkar Jul 15 '20 at 08:33
  • @Krzysztof Krzeszewski when i did change set http_proxy to set proxy and ran it but still this problem is not fixed give me same error – Sandeep Ambedkar Jul 15 '20 at 08:44
  • what proxy are you using? I'm asking because `proxy.company.com` is not a real url, just a sample you probably found somewhere, i'm just wondering whether you realize this and are trying to hide the actual url, or are you just unaware of it – Krzysztof Krzeszewski Jul 15 '20 at 08:45
  • sometime some companies have a private repository (NEXUS, JFROG ..) used like a mirror, for access to external servers. – Gianluca Musa Jul 15 '20 at 08:53
  • @Krzysztof Krzeszewski check it please https://lh3.googleusercontent.com/-6-PNdN9bPMQ/Xw7S9k7rVlI/AAAAAAAABfk/yIm2mn7l9EIYcxkmoVBBy6TX5MJqSaXaQCK8BGAsYHg/s0/2020-07-15.png – Sandeep Ambedkar Jul 15 '20 at 09:59
  • @SandeepAmbedkar "so plz tell me which will have best for this problem" that is for you to figure out. Krzysztof brought you to the water, drinking it is your job. – Pranav Hosangadi Jul 15 '20 at 15:26
  • Finally issue is fixed with running these three command ***************************************************************************** # npm config set http-proxy null # npm config set https-proxy null # npm config set registry http://registry.npmjs.org/ ************************************************** Proxy will have null for http and https… ***Thankyou to all for cooperation*** – Sandeep Ambedkar Jul 15 '20 at 15:31
  • Pranav Hosangadi actually i am working on ionic3 basically it is my job currenty but which link did provided by @Krzysztof Krzeszewski to me that link has variouse puzzle but will much helpfull for other issue command so this problem i did solve by me with R&D – Sandeep Ambedkar Jul 15 '20 at 15:47

0 Answers0