Sublime Forum

Error with LSP-typescript

#1

Suddenly I got this error when using Sublime 4
It was working normally the day before, although recently the LSP started to be unstable, sometimes I had to restart sublime to make LSP syntax check work
please help

Failed to start LSP-typescript - disabling for this window for the duration of the current session.
Re-enable by running "LSP: Enable Language Server In Project" from the Command Palette.

--- Error: ---
Error installing the server:
Failed to run npm command "ci --omit=dev --scripts-prepend-node-path=true --verbose":
npm verb cli /Users/linh/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/18.18.1/node/bin/node /Users/linh/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/18.18.1/node/lib/node_modules/npm/bin/npm-cli.js
npm info using npm@9.8.1
npm info using node@v18.18.1
npm verb title npm ci
npm verb argv "ci" "--omit" "dev" "--scripts-prepend-node-path" "true" "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:/Users/linh/.npm/_logs/2023-12-13T14_16_37_290Z-
npm verb logfile /Users/linh/.npm/_logs/2023-12-13T14_16_37_290Z-debug-0.log
npm verb audit error FetchError: request to https://registry.npmjs.org/-/npm/v1/security/audits/quick failed, reason: connect ECONNREFUSED 2606:4700::6810:1b22:443
npm verb audit error     at ClientRequest.<anonymous> (/Users/linh/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/18.18.1/node/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
npm verb audit error     at ClientRequest.emit (node:events:517:28)
npm verb audit error     at TLSSocket.socketErrorListener (node:_http_client:501:9)
npm verb audit error     at TLSSocket.emit (node:events:529:35)
npm verb audit error     at emitErrorNT (node:internal/streams/destroy:151:8)
npm verb audit error     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm verb audit error     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm verb audit error  FetchError: request to https://registry.npmjs.org/-/npm/v1/security/audits/quick failed, reason: connect ECONNREFUSED 2606:4700::6810:1b22:443
npm verb audit error     at ClientRequest.<anonymous> (/Users/linh/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/18.18.1/node/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
npm verb audit error     at ClientRequest.emit (node:events:517:28)
npm verb audit error     at TLSSocket.socketErrorListener (node:_http_client:501:9)
npm verb audit error     at TLSSocket.emit (node:events:529:35)
npm verb audit error     at emitErrorNT (node:internal/streams/destroy:151:8)
npm verb audit error     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm verb audit error     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
npm verb audit error   code: 'ECONNREFUSED',
npm verb audit error   errno: 'ECONNREFUSED',
npm verb audit error   syscall: 'connect',
npm verb audit error   address: '2606:4700::6810:1b22',
npm verb audit error   port: 443,
npm verb audit error   type: 'system'
npm verb audit error }
npm verb type system
npm verb stack FetchError: request to https://registry.npmjs.org/typescript-language-server/-/typescript-language-server-4.2.0.tgz failed, reason: connect ECONNREFUSED 2606:4700::6810:1b22:443
npm verb stack     at ClientRequest.<anonymous> (/Users/linh/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/18.18.1/node/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
npm verb stack     at ClientRequest.emit (node:events:517:28)
npm verb stack     at TLSSocket.socketErrorListener (node:_http_client:501:9)
npm verb stack     at TLSSocket.emit (node:events:529:35)
npm verb stack     at emitErrorNT (node:internal/streams/destroy:151:8)
npm verb stack     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm verb stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm verb cwd /Users/linh/Library/Caches/Sublime Text/Package Storage/LSP-typescript/18.18.1/typescript-language-server
npm verb Darwin 22.6.0
npm verb node v18.18.1
npm verb npm  v9.8.1
npm ERR! code ECONNREFUSED
npm ERR! syscall connect
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to https://registry.npmjs.org/typescript-language-server/-/typescript-language-server-4.2.0.tgz failed, reason: connect ECONNREFUSED 2606:4700::6810:1b22:443
npm ERR!     at ClientRequest.<anonymous> (/Users/linh/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/18.18.1/node/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
npm ERR!     at ClientRequest.emit (node:events:517:28)
npm ERR!     at TLSSocket.socketErrorListener (node:_http_client:501:9)
npm ERR!     at TLSSocket.emit (node:events:529:35)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR!  FetchError: request to https://registry.npmjs.org/typescript-language-server/-/typescript-language-server-4.2.0.tgz failed, reason: connect ECONNREFUSED 2606:4700::6810:1b22:443
npm ERR!     at ClientRequest.<anonymous> (/Users/linh/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/18.18.1/node/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
npm ERR!     at ClientRequest.emit (node:events:517:28)
npm ERR!     at TLSSocket.socketErrorListener (node:_http_client:501:9)
npm ERR!     at TLSSocket.emit (node:events:529:35)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
npm ERR!   code: 'ECONNREFUSED',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   syscall: 'connect',
npm ERR!   address: '2606:4700::6810:1b22',
npm ERR!   port: 443,
npm ERR!   type: 'system'
npm ERR! }
npm ERR! 
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'
npm verb exit 1
npm verb unfinished npm timer reify 1702476997535
npm verb unfinished npm timer reify:unpack 1702476997542
npm verb unfinished npm timer reifyNode:node_modules/typescript-language-server 1702476997542
npm verb unfinished npm timer reifyNode:node_modules/typescript 1702476997542
npm verb code 1

npm ERR! A complete log of this run can be found in: /Users/linh/.npm/_logs/2023-12-13T14_16_37_290Z-debug-0.log
0 Likes

#2

Looks like the http get request to download the language server is blocked by firewall or an issue with certificate chain preventing correct HTTPS connection to be established.

0 Likes

#3

Solved it by upgrading the OS
Sorry for making a fuss
should always update software

1 Like