You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In npm 6, npm install works behind a proxy when the http_proxy and https_proxy environment variables are set.
npm 7 fails with:
#9 [5/5] RUN npm install
#9 6.650 npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
#9 11.04 npm ERR! code ENOTFOUND
#9 11.04 npm ERR! syscall getaddrinfo
#9 11.04 npm ERR! errno ENOTFOUND
#9 11.04 npm ERR! network request to https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz failed, reason: getaddrinfo ENOTFOUND xxx.proxy.corp.com
#9 11.04 npm ERR! network This is a problem related to network connectivity.
#9 11.04 npm ERR! network In most cases you are behind a proxy or have bad network settings.
#9 11.04 npm ERR! network
#9 11.04 npm ERR! network If you are behind a proxy, please make sure that the
#9 11.05 npm ERR! network 'proxy' config is set properly. See: 'npm help config'
#9 11.06
#9 11.06 npm ERR! A complete log of this run can be found in:
#9 11.06 npm ERR! /root/.npm/_logs/2021-01-20T23_07_32_036Z-debug.log
#9 ERROR: executor failed running [/bin/sh -c npm install]: runc did not terminate sucessfully
If I replace the proxy DNS name with its IP address, it works fine, so it seems to be a bug in proxy DNS name resolution.
Expected Behavior:
It works fine in npm 6 using the proxy DNS name (no IP address required):
#8 [4/4] RUN npm install
#8 5.827 npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
#8 15.08
#8 15.08 > [email protected] postinstall /usr/src/app/node_modules/core-js
#8 15.08 > node -e "try{require('./postinstall')}catch(e){}"
#8 15.08
#8 15.13 Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
#8 15.13
#8 15.13 The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
#8 15.13 > https://opencollective.com/core-js
#8 15.13 > https://www.patreon.com/zloirock
#8 15.13
#8 15.13 Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
#8 15.13
#8 15.25 npm notice created a lockfile as package-lock.json. You should commit this file.
#8 15.26 added 134 packages from 82 contributors and audited 135 packages in 14.626s
#8 15.32
#8 15.32 2 packages are looking for funding
#8 15.32 run `npm fund` for details
#8 15.32
#8 15.32 found 0 vulnerabilities
#8 15.32
#8 DONE 15.5s
Environment:
OS: node:lts-alpine and node:current-alpine in Docker 19.03.13
npm: 6.14.10 and 7.4.2
The text was updated successfully, but these errors were encountered:
@wpwoodjr can you try the latest v7 & see if you're still experiencing this issue? (ie. npm i -g npm@7) We've recently shipped some fixes that should deal with this.
Proxy Configuration Check:
Even if your device doesn't have a set proxy, sometimes npm might still try to use proxy configurations from environment variables or system settings. You can explicitly tell npm not to use a proxy by running:
Current Behavior:
In npm 6,
npm install
works behind a proxy when thehttp_proxy
andhttps_proxy
environment variables are set.npm 7 fails with:
If I replace the proxy DNS name with its IP address, it works fine, so it seems to be a bug in proxy DNS name resolution.
Expected Behavior:
It works fine in npm 6 using the proxy DNS name (no IP address required):
Environment:
The text was updated successfully, but these errors were encountered: