question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VLS crashes for *.vue files in node_modules

See original GitHub issue
  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Win 10
  • Vetur version: 0.24
  • Sublime Text Version: 3.2.2

Problem

lsp-vue: Loaded bundled typescript@3.9.5.
lsp-vue: Vetur initialized
:: --> lsp-vue initialize(1): {'clientInfo': {'version': '0.11.2', 'name': 'Sublime Text LSP'}, 'initializationOptions': {'config': {'html': {'suggest': {}}, 'typescript': {'format': {}}, 'stylusSupremacy': {}, 'vetur': {'useWorkspaceDependencies': False, 'validation': {'style': True, 'script': True, 'template': True}, 'completion': {'tagCasing': 'kebab', 'useScaffoldSnippets': False, 'autoImport': False}, 'format': {'defaultFormatter': {'js': 'none', 'ts': 'none'}, 'options': {'useTabs': False, 'tabSize': 4}, 'scriptInitialIndent': False, 'defaultFormatterOptions': {}, 'enable': True, 'styleInitialIndent': False}, 'experimental': {'templateInterpolationService': True}}, 'javascript': {'format': {}}, 'css': {}, 'emmet': {}}}, 'processId': 139716, 'rootUri': 'file:///V:/MyProject', 'capabilities': {'workspace': {'symbol': {'dynamicRegistration': True, 'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}}, 'applyEdit': True, 'configuration': True, 'executeCommand': {}, 'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}, 'workspaceFolders': True, 'didChangeConfiguration': {'dynamicRegistration': True}}, 'experimental': {}, 'textDocument': {'hover': {'contentFormat': ['markdown', 'plaintext'], 'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'definition': {'linkSupport': True, 'dynamicRegistration': True}, 'rename': {'dynamicRegistration': True}, 'synchronization': {'didSave': True, 'willSave': True, 'willSaveWaitUntil': True, 'dynamicRegistration': True}, 'references': {'dynamicRegistration': True}, 'documentSymbol': {'hierarchicalDocumentSymbolSupport': True, 'dynamicRegistration': True, 'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}}, 'completion': {'completionItemKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}, 'completionItem': {'snippetSupport': True}, 'dynamicRegistration': True}, 'implementation': {'linkSupport': True, 'dynamicRegistration': True}, 'publishDiagnostics': {'relatedInformation': True}, 'colorProvider': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}}, 'typeDefinition': {'linkSupport': True, 'dynamicRegistration': True}, 'documentHighlight': {'dynamicRegistration': True}, 'codeAction': {'codeActionLiteralSupport': {'codeActionKind': {'valueSet': []}}, 'dynamicRegistration': True}, 'declaration': {'linkSupport': True, 'dynamicRegistration': True}}, 'window': {'workDoneProgress': True}}, 'workspaceFolders': [{'uri': 'file:///V:/MyProject', 'name': 'MyProject'}, {'uri': 'file:///V:/MyProject/resources/workspaces/router', 'name': 'router'}, {'uri': 'file:///V:/MyProject/modules/drivers', 'name': 'drivers'}, {'uri': 'file:///V:/MyProject/system', 'name': 'system'}, {'uri': 'file:///V:/MyProject/themes/frontend', 'name': 'frontend'}, {'uri': 'file:///V:/MyProject/themes/backend', 'name': 'backend'}], 'rootPath': 'v:\\MyProject'}
:: <<< lsp-vue 1: {'capabilities': {'textDocumentSync': 1, 'referencesProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(']}, 'documentLinkProvider': {'resolveProvider': False}, 'completionProvider': {'resolveProvider': True, 'triggerCharacters': ['.', ':', '<', '"', "'", '/', '@', '*']}, 'colorProvider': True, 'hoverProvider': True, 'documentHighlightProvider': True, 'codeActionProvider': True, 'documentFormattingProvider': False, 'documentSymbolProvider': True, 'definitionProvider': True}}
::  -> lsp-vue initialized: {}
::  -> lsp-vue textDocument/didOpen
lsp-vue: D:\~\bin\vetur\server\node_modules\typescript\lib\typescript.js:2251
lsp-vue: throw e;
lsp-vue: ^
lsp-vue: 
lsp-vue: Error: Debug Failure. Expected 3 === 1. Registered script kind should match new script kind.
lsp-vue: at Object.getOrCreateSourceFileByPath [as getSourceFileByPath] (D:\~\bin\vetur\server\node_modules\typescript\lib\typescript.js:139326:34)
lsp-vue: at tryReuseStructureFromOldProgram (D:\~\bin\vetur\server\node_modules\typescript\lib\typescript.js:100516:28)
lsp-vue: at Object.createProgram (D:\~\bin\vetur\server\node_modules\typescript\lib\typescript.js:100099:30)

Reproducible Case

Crashes when restarting vue language server

LSP plugin settings

"lsp-vue":
{
	"command":
	[
		"node",
		"D:/~/bin/vetur/server/bin/vls",
		"--stdio"
	],
	"enabled": true
},

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rchlcommented, Jun 23, 2020

OK, then just take the options from https://github.com/sublimelsp/LSP-vue/blob/master/LSP-vue.sublime-settings and include in your configuration.

Something like this
"lsp-vue":
{
    "enabled": true
    "command":
    [
        "node",
        "D:/~/bin/vetur/server/bin/vls",
        "--stdio"
    ],
    "languages": [
        {
            "languageId": "vue",
            "scopes": ["text.html.vue"],
            "syntaxes": ["Packages/Vue Syntax Highlight/Vue Component.sublime-syntax"],
        }
    ],
    "initializationOptions": {
        "config": {
            "vetur": {
                "completion": {
                    "autoImport": false,
                    "tagCasing": "kebab",
                    "useScaffoldSnippets": false,
                },
                "experimental": {
                    "templateInterpolationService": true,
                },
                "format": {
                    "enable": true,
                    "defaultFormatter": {
                        "js": "none",
                        "ts": "none",
                    },
                    "defaultFormatterOptions": {},
                    "scriptInitialIndent": false,
                    "styleInitialIndent": false,
                    "options": {
                        // tabSize and useTabs will be automatically inferred from the workspace
                    },
                },
                "useWorkspaceDependencies": false,
                "validation": {
                    "script": true,
                    "style": true,
                    "template": true,
                },
            },
            "css": {
                "validate": true,
                "completion": {
                    "triggerPropertyValueCompletion": true,
                    "completePropertyWithSemicolon": true,
                },
                "customData": [],
                "lint": {
                    "compatibleVendorPrefixes": "ignore",
                    "vendorPrefix": "warning",
                    "duplicateProperties": "ignore",
                    "emptyRules": "warning",
                    "importStatement": "ignore",
                    "boxModel": "ignore",
                    "universalSelector": "ignore",
                    "zeroUnits": "ignore",
                    "fontFaceProperties": "warning",
                    "hexColorLength": "error",
                    "argumentsInColorFunction": "error",
                    "unknownProperties": "warning",
                    "validProperties": [],
                    "ieHack": "ignore",
                    "unknownVendorSpecificProperties": "ignore",
                    "propertyIgnoredDueToDisplay": "warning",
                    "important": "ignore",
                    "float": "ignore",
                    "idSelector": "ignore",
                    "unknownAtRules": "warning",
                },

            },
            "emmet": {},
            "stylusSupremacy": {},
            "html": {
                "suggest": {},
            },
            "javascript": {
                "format": {},
            },
            "typescript": {
                "format": {},
            }
        }
    },
    "settings": {}
},
0reactions
octrefcommented, Aug 26, 2020

Thanks for the repro. I disabled diagnostics for any vue files in node_modules. Should improve perf as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VLC crashes when opening video files - The VideoLAN Forums
Hello, VLC started crashing right after the opening of all video files (QT-apple pro res or H264), only sound files can be read....
Read more >
VLC Crashes when attempting to play a Blu ray with Java menus
The issue can be reproduced by: Trying to load a Blu-ray folder that uses Java to display the menu, the VLC immediately crashes....
Read more >
VLC crashes after trying to play a video - The VideoLAN Forums
Re: VLC crashes after trying to play a video​​ Yes, the crash is known (it is caused by the new security protections mechanism...
Read more >
VLC crashes playing .mpg, almost always
A particular .mpg file causes VLC to crash when I attempt to play it. ... When it crashes, the audio stream is playing...
Read more >
New version of VLC crashes when I start a movie
Hi, as soon as a file starts opening, VLC just shuts down. -there is no crash report generated, sorry -I have deleted my...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found