sublimelsp / LSP-typescript

TypeScript, JavaScript support for Sublime LSP plugin
MIT License
132 stars 11 forks source link

Server install failed #174

Closed evamango closed 1 year ago

evamango commented 1 year ago

I got this after restart Sublime. Before that it works fine. THX!

Troubleshooting: LSP-typescript

Version

npm ERR! A complete log of this run can be found in: npm ERR! /Users/Evans/.npm/_logs/2022-10-26T12_08_08_864Z-debug.log

## Server Configuration
 - command
```json
[
  "/usr/local/bin/node", 
  "${server_path}", 
  "--stdio"
]
 - selector

source.js, source.jsx, source.ts, source.tsx

 - priority_selector

source.js, source.jsx, source.ts, source.tsx

 - init_options
```json
{
  "locale": "en", 
  "logVerbosity": "off", 
  "maxTsServerMemory": 0, 
  "npmLocation": "", 
  "plugins": [], 
  "preferences": {
    "allowIncompleteCompletions": true, 
    "allowRenameOfImportPath": true, 
    "allowTextChangesInNewFiles": true, 
    "autoImportFileExcludePatterns": [], 
    "displayPartsForJSDoc": true, 
    "generateReturnInDocTemplate": true, 
    "includeAutomaticOptionalChainCompletions": true, 
    "includeCompletionsForImportStatements": true, 
    "includeCompletionsForModuleExports": true, 
    "includeCompletionsWithClassMemberSnippets": true, 
    "includeCompletionsWithInsertText": true, 
    "includeCompletionsWithObjectLiteralMethodSnippets": true, 
    "includeCompletionsWithSnippetText": true, 
    "jsxAttributeCompletionStyle": "auto", 
    "providePrefixAndSuffixTextForRename": true, 
    "useLabelDetailsInCompletionEntries": true
  }, 
  "tsserver": {
    "logDirectory": "", 
    "logVerbosity": "off", 
    "path": "", 
    "trace": "off"
  }
}

Active view

Project / Workspace

LSP configuration

{
  "lsp_code_actions_on_save": {}, 
  "on_save_task_timeout_ms": 500, 
  "show_diagnostics_count_in_view_status": true, 
  "show_diagnostics_panel_on_save": 1, 
  "show_diagnostics_severity_level": 2
}

System PATH

rchl commented 1 year ago

You have some configuration somewhere (maybe in /Users/Evans/.npmrc) that overrides the registry used for fetching NPM packages.

The registry mirror used (https://registry.npmmirror.com) doesn't seem to have that package available.

evamango commented 1 year ago

You're my hero. It's OK after comment this line in .npmrc. registry=https://registry.npmmirror.com/

Many thanks