节点sass npm软件包节点模块出现问题

时间:2020-10-30 08:57:17

标签: node.js npm command-line node-modules npm-install

命令行中的npm软件包安装问题,几个软件包的一般性问题,因为节点sass安装尝试未安装该怎么办,现在它阻止了所有软件包的安装?

我已经卸载并重新安装了节点,它仍然阻止npm,而且给我错误的速度非常慢。发生了什么事,我也不知道。

 Windows PowerShell
Copyright (C) Microsoft Corporation. Tous droits réservés.

Testez le nouveau système multiplateforme PowerShell https://aka.ms/pscore6

PS C:\Users\opsty> npm -v
6.14.8
PS C:\Users\opsty> npm install --global --production windows-build-tools
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/windows-build-tools failed, reason: connect ETIMEDOUT 93.184.216.34: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!     C:\Users\opsty\AppData\Roaming\npm-cache\_logs\2020-10-30T08_31_04_559Z-debug.log
PS C:\Users\opsty> npm install -g @angular/cli
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/@angular%2fcli failed, reason: connect ETIMEDOUT 93.184.216.34:8080
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/@angular/cli/-/cli-10.2.0.tgz failed, reason: connect ETIMEDOUT 93.184.216.34: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!     C:\Users\opsty\AppData\Roaming\npm-cache\_logs\2020-10-30T08_37_03_772Z-debug.log
PS C:\Users\opsty> npm install node-gyp
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/node-gyp failed, reason: connect ETIMEDOUT 93.184.216.34:8080
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz failed, reason: connect ETIMEDOUT 93.184.216.34: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!     C:\Users\opsty\AppData\Roaming\npm-cache\_logs\2020-10-30T08_43_11_642Z-debug.log
PS C:\Users\opsty>

2 个答案:

答案 0 :(得分:0)

这看起来不像是节点或npm问题。可能是您的DNS服务器行为不正常吗?

换句话说,当您首先看到这样的错误时,您需要确保您的计算机可以与https://registry.npmjs.org/ DNS名称和93.184.216.34 IP地址进行对话。

答案 1 :(得分:0)

问题解决了,所以我做了一个npm config delete proxy npm config delete htpp-proxy

npm config delete proxy
npm config delete http-proxy
npm config delete https-proxy

npm config rm proxy
npm config rm https-proxy

npm config delete http-proxy
npm config delete https-proxy