我无法安装node_modules
错误:
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
failed, reason: Client network socket disconnected before secure TLS connection was established
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'
问题已解决
node -v
npm -v
nvm -v
npm ping
npm doctor
rm -rf node_modules
npm cache clean --force
OR
C folder >> users >> Saiprasad >> AppData >> Roming >> npm >> delete npm cache file
npm whoami
npm login
npm whoami
npm config get registry
npm config get registry
If you are installing packages from private registry like JFrog then
npm config set registry <your npmrc file url>
If you are installing packages from npm then
npm config set registry https://registry.npmjs.org/
检查状态:
git config --get user.email
git config --get user.name
git config --list --show-origin
git config --list
套装:
git config --global user.name "John Doe"
git config --global user.email [email protected]
now do npm i
额外:
npm config set fetch-timeout 60000
npm config fetch-retry-maxtimeout 60000
询问 IT 团队公司是否正在使用任何代理网络,然后使用该代理
使用以下命令设置您的 npm 代理:
npm config delete proxy
npm config delete http-proxy
npm config set proxy http://<proxy.company.com>:
npm config set https-proxy http://<proxy.company.com>:
Example:
$ npm config set proxy http://web-proxy.corp.xyzcorp.net:8080
$ sudo npm config set proxy http://web-proxy.corp.xyzcorp.net:8080
其他命令:
git config --global core.gitproxy gitproxy
git config --global url.https://github.com/.insteadOf git://github.com/
npm config fix