npm install stylus --save失败
发布日期:2021-06-30 16:08:10 浏览次数:2 分类:技术文章

本文共 2286 字,大约阅读时间需要 7 分钟。

下面是日志文件

0 info it worked if it ends with ok1 verbose cli [ 'F:\\Install\\web\\nodejsInstall\\node.exe',1 verbose cli   'F:\\Install\\web\\nodejsInstall\\node_modules\\npm\\bin\\npm-cli.js',1 verbose cli   'install',1 verbose cli   'stylus',1 verbose cli   '--save' ]2 info using npm@6.4.13 info using node@v10.12.04 verbose npm-session 8d66494b927eb5775 silly install loadCurrentTree6 silly install readLocalPackageData7 silly fetchPackageMetaData error for stylus@latest request to https://registry.npmjs.org/stylus failed, reason: connect ETIMEDOUT 104.16.26.35:4438 timing stage:rollbackFailedOptional Completed in 1ms9 timing stage:runTopLevelLifecycles Completed in 150342ms10 verbose type system11 verbose stack FetchError: request to https://registry.npmjs.org/stylus failed, reason: connect ETIMEDOUT 104.16.26.35:44311 verbose stack     at ClientRequest.req.on.err (F:\Install\web\nodejsInstall\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)11 verbose stack     at ClientRequest.emit (events.js:182:13)11 verbose stack     at TLSSocket.socketErrorListener (_http_client.js:391:9)11 verbose stack     at TLSSocket.emit (events.js:182:13)11 verbose stack     at emitErrorNT (internal/streams/destroy.js:82:8)11 verbose stack     at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)11 verbose stack     at process._tickCallback (internal/process/next_tick.js:63:19)12 verbose cwd F:\Install\CompilerWorkspace\WebStorm\travel\travel\travel13 verbose Windows_NT 10.0.1713414 verbose argv "F:\\Install\\web\\nodejsInstall\\node.exe" "F:\\Install\\web\\nodejsInstall\\node_modules\\npm\\bin\\npm-cli.js" "install" "stylus" "--save"15 verbose node v10.12.016 verbose npm  v6.4.117 error code ETIMEDOUT18 error errno ETIMEDOUT19 error network request to https://registry.npmjs.org/stylus failed, reason: connect ETIMEDOUT 104.16.26.35:44320 error network This is a problem related to network connectivity.20 error network In most cases you are behind a proxy or have bad network settings.20 error network20 error network If you are behind a proxy, please make sure that the20 error network 'proxy' config is set properly.  See: 'npm help config'21 verbose exit [ 1, true ]

解决方法:

使用镜像 ,在 .npmrc 加入下面内容

registry = http://registry.cnpmjs.org

.npmrc 一般在 C 盘的 user 文件夹

转载地址:https://kaven.blog.csdn.net/article/details/83652783 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:mysql cmd 使用
下一篇:用Webpack启动Vue项目时提示This is probably not a problem with npm,there is likely additional logging output

发表评论

最新留言

关注你微信了!
[***.104.42.241]2024年04月26日 10时48分24秒