首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >npm安装错误-104

npm安装错误-104
EN

Stack Overflow用户
提问于 2022-04-04 13:15:59
回答 1查看 738关注 0票数 1

我正在尝试使用最新的npm安装一个包tree-sitter-cli

代码语言:javascript
运行
复制
❯ npm -v
8.6.0

但是继续得到以下错误。

代码语言:javascript
运行
复制
63 timing command:i Completed in 885ms
64 verbose stack Error: command failedche/_logs/2022-04-04T12_58_29_622Z-debug-0.log
64 verbose stack     at ChildProcess.<anonymous> (~/.local/lib/node_modules/npm/node_
modules/@npmcli/promise-spawn/index.js:64:27)
64 verbose stack     at ChildProcess.emit (node:events:527:28)
64 verbose stack     at maybeClose (node:internal/child_process:1090:16)
64 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
65 verbose pkgid tree-sitter-cli@0.20.6
66 verbose cwd /glb/home/innnei
67 verbose Linux 3.10.0-1160.53.1.el7.x86_64
68 verbose node v17.8.0
69 verbose npm  v8.6.0
70 error code 1
71 error path ~/.local/lib/node_modules/tree-sitter-cli
72 error command failed
73 error command sh -c node install.js
74 error Downloading https://github.com/tree-sitter/tree-sitter/releases/download/v0.20.6/tree-sitter-linux-x64.gz
75 error node:events:505
75 error       throw er; // Unhandled 'error' event
75 error       ^
75 error
75 error Error: read ECONNRESET
75 error     at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
75 error Emitted 'error' event on ClientRequest instance at:
75 error     at TLSSocket.socketErrorListener (node:_http_client:454:9)
75 error     at TLSSocket.emit (node:events:527:28)
75 error     at emitErrorNT (node:internal/streams/destroy:164:8)
75 error     at emitErrorCloseNT (node:internal/streams/destroy:129:3)
75 error     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
75 error   errno: -104,
75 error   code: 'ECONNRESET',
75 error   syscall: 'read'
75 error }
75 error
75 error Node.js v17.8.0
76 verbose exit 1
77 timing npm Completed in 1349ms
78 verbose unfinished npm timer reify 1649077110082
79 verbose unfinished npm timer reify:audit 1649077110203
80 verbose unfinished npm timer auditReport:getReport 1649077110203
81 verbose unfinished npm timer reify:build 1649077110257
82 verbose unfinished npm timer build 1649077110257
83 verbose unfinished npm timer build:deps 1649077110257
84 verbose unfinished npm timer build:run:install 1649077110261
85 verbose unfinished npm timer build:run:install:node_modules/tree-sitter-cli 1649077110262
86 verbose code 1

我支持一个公司代理(代理设置是通过shell变量http_proxy & https_proxy设置的),npm正在使用代理设置。

代码语言:javascript
运行
复制
❯ npm ping
npm notice PING https://registry.npmjs.org/
npm notice PONG 819ms

这(node & npm)实际上不是我的专业领域,所以我需要帮助来理解和诊断错误。

我的npm配置是

代码语言:javascript
运行
复制
cache = "~/.local/npmcache"
registry = "https://registry.npmjs.org/"

; "cli" config from command line options

global = true

; node bin location = ~/.local/bin/node
; cwd = $HOME/innnei
; HOME = $HOME/innnei
; Run `npm config ls -l` to show all defaults.
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71737929

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档