npm installation errorno -104

I am trying to install a package tree-sitter-cli using the latest npm

❯ npm -v
8.6.0

But keep getting the following error.

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
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

I am behind a corporate proxy (proxy setting is set through shell variables http_proxy & https_proxy ) and npm is working with the proxy settings

❯ npm ping
npm notice PING
npm notice PONG 819ms

This (node & npm) is not really my area of expertise, so I need help in understanding & diagnosing the error.

My npm config is

cache = "~/.local/npmcache"
registry = ""
; "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.
Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like