language-tools: Vue server still crashed after upgrading to v2.0.4 in VSCode + Nuxt 3

Sorry to open a duplicated issue, I want to provide a reproduction here.

Reproduction

Environment

Apple M2 macOS Sonoma 14.2.1 Node v20.9.0 VSCode v1.87.0 pnpm v8.2.0 nuxt v3.2.2 Vue.volar v2.0.4

git clone https://github.com/Bernankez/blog.git
cd blog
pnpm install

After opening a Vue SFC, it alerts image

outputs

null
null
null
undefined:1


SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Socket.<anonymous> (/Users/cole/.vscode/extensions/vue.volar-2.0.4/dist/server.js:10024:9777)
    at Socket.emit (node:events:526:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v18.17.1
[Error - 14:27:08] Server process exited with code 1.
[Info  - 14:27:08] Connection to server got closed. Server will restart.
true
null
null
null
undefined:1

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Reactions: 54
  • Comments: 48 (24 by maintainers)

Commits related to this issue

Most upvoted comments

Can y’all please stop saying “same for me”. It adds no value whatsoever and sends out notifications to hundreds of people who are subscribing to this issue.

Finally, by customizing the following settings everything just works fine, even in large-scale projects. 😂

"vue.server.maxOldSpaceSize": 4096,
"typescript.tsserver.maxTsServerMemory": 4096,
"typescript.tsserver.nodePath": "node",

Optional

  1. Install JavaScript and TypeScript Nightly
  2. Upgrade your local machine node version to v21

In case it’s helpful to anyone, enabling “Vue › Server: Hybrid Mode” in the extension settings fixed the problem for me.

Workaround: Use vscode insiders for now. https://code.visualstudio.com/insiders/

VSCode 1.88 has been released and has resolved this issue. Please make sure to update.

why is this closed? its still happening in v2.0.7

@acidjazz Upgrade to VSCode 1.88

1.88.0 has not been officially released yet.

Crashing on v2+

Same for me

FYI If you rollback to the previous major version of this extension (1.X) and want to reinstall the Typescript plugin you’ll have to use this command in the command palette as it’s no longer installable using the extensions panel since it’s deprecated:

ext install vue.vscode-typescript-vue-plugin

Specific to https://github.com/Bernankez/blog.git, this may be caused by out-of-memory. If there are many typescript plugin extensions installed, or there are a large number of .vue files or the libraries they depend on are large, tsserver will require more memory. Please try setting typescript.tsserver.maxTsServerMemory to a larger value in VSCode settings to see if the problem can be solved.

If the problem persists, please provide your repro case, or contact me in the Vue Land discord server to investigate using remote desktop.

Workaround: Use vscode insiders for now. https://code.visualstudio.com/insiders/

As mentioned, this is a vscode specific issue on Darwin. Please use vscode insiders edition for now, until they’ve shipped their update containing an updated Node version (18.18). The relevant node version here is the one that the current stable version of vscode ships with (18.17), not the one that you’ve installed on your system.

Also, there are 2 different errors discussed in this issue, one relates to the Vue extension that crashes and the other relates to the TS server that crashes. The TS server with the SIGBUS error is probably related to VSCode on Darwin. The other might be related to other extensions or the amount of memory available for the tsserver.

Hi @isidorn, sorry to bother you. Due to the widespread errors caused by the Node version bundled with VSCode 1.87 mentioned in this issue, can we consider upgrading the Node version to 1.87 before the release of 1.88?

Does this work on non-insiders VS Code now? Is it fixed?

VSCode: v 1.87.1 Vue Official: v2.0.6 TypeScript and JavaScript Language Features: v1.0.0

If it helps any, I disabled all extensions, excluding Vue Official and the builtin extensions and I still get the error.

The JS/TS language service immediately crashed 5 times. The service will not be restarted.
This may be caused by a plugin contributed by one of these extensions: Vue.volar.
Please try disabling these extensions before filing an issue against VS Code.

Also this did not work for me. I did also try it with all extensions disabled like above.

Finally by customizing the following settings everything just works fine, even in large-scale projects. 😂

"vue.server.maxOldSpaceSize": 4096,
"typescript.tsserver.maxTsServerMemory": 4096,
"typescript.tsserver.nodePath": "node",

List of my enabled extensions. The old Volar extension was removed, I assume that’s the Vue Official Extension in this list.

Extension Author (truncated) Version volar Vue 2.0.6

Maybe you can try this

  1. Install JavaScript and TypeScript Nightly
  2. Upgrade your local machine node version to v21

Reverting to v1.8.27 working fine, But v2.0.0 to v2.0.4 crashes for me

Interestingly, it works fine with vscode insiders. Even with big projects

In addition, if you can see this window, please try to disable extensions other than Vue.volar in your list one by one to see if you can avoid the crash. It is currently known that enabling svelte.svelte-vscode together with Vue.volar may cause SIGSEGV.

image

Same problem here. On a M3 Pro.

Extension Author (truncated) Version
project-manager ale 12.7.0
vscode-apollo apo 1.20.0
npm-intellisense chr 1.4.5
gitignore cod 0.9.0
dbclient-jdbc cwe 1.3.4
vscode-database-client2 cwe 7.0.9
vscode-eslint dba 2.4.4
composer-php-vscode DEV 1.45.15061
intelli-php-vscode DEV 0.12.15062
phptools-vscode DEV 1.45.15061
profiler-php-vscode DEV 1.45.15061
git-extension-pack don 0.1.3
githistory don 0.6.20
es7-react-js-snippets dsz 4.4.3
gitlens eam 14.8.2
prettier-vscode esb 10.1.0
vscode-firefox-debug fir 2.9.10
copilot Git 1.171.0
copilot-chat Git 0.13.2024022301
heygithub Git 0.21.1441
todo-tree Gru 0.0.226
cypress-fixture-intellisense Jos 1.2.0
vscode-codemetrics kis 1.26.1
i18n-ally lok 2.12.0
code-coverage mar 1.11.0
vscode-docker ms- 1.29.0
csharp ms- 2.15.30
vscode-dotnet-runtime ms- 2.0.2
playwright ms- 1.0.22
remote-containers ms- 0.348.0
azure-account ms- 0.11.6
vsliveshare ms- 1.0.5905
vscode-react-native msj 1.12.3
vscode-groovy-lint Nic 3.2.1
cfxlua-vscode ove 1.7.18
vscode-xml red 0.26.1
vscode-yaml red 1.14.0
LiveServer rit 5.7.9
vue-vscode-snippets sdr 3.1.1
sonarlint-vscode Son 4.3.0
lua sum 3.7.4
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.2.30
vscodeintellicode-completions Vis 1.0.22
volar Vue 2.0.4
vitest-explorer Zix 0.2.46
vscode-open-in-github ziy 1.3.6
Extension Author (truncated) Version
browse-lite ant 0.3.7
vite ant 0.2.5
tailwind-docs aus 2.1.0
vscode-tailwindcss bra 0.10.5
path-intellisense chr 2.8.5
language-postcss cpy 1.1.0
crystal-lang cry 0.9.3
vscode-eslint dba 2.4.4
githistory don 0.6.20
EditorConfig Edi 0.16.4
prettier-vscode esb 10.1.0
codespaces Git 1.16.11
copilot Git 1.171.0
copilot-chat Git 0.13.0
vscode-github-actions git 0.26.2
volarjs-labs joh 2.0.3
dotenv mik 1.0.1
vscode-docker ms- 1.29.0
debugpy ms- 2024.2.0
jupyter ms- 2024.2.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.17
vscode-jupyter-cell-tags ms- 0.1.8
vscode-jupyter-slideshow ms- 0.1.5
live-server ms- 0.4.13
makefile-tools ms- 0.8.22
rose-pine mvl 2.9.0
vscode-twoslash-queries Ort 1.2.2
vscode-coverage-gutters rya 2.11.1
crystal-fmt The 1.0.2
cmake twx 0.0.17
vscode-lldb vad 1.10.0
explorer vit 0.4.0
vscode-icons vsc 12.7.0
vim vsc 1.27.2
volar Vue 2.0.4
gitblame wad 10.9.0
pretty-ts-errors Yoa 0.5.3
markdown-all-in-one yzh 3.6.2
material-theme zhu 3.16.2

<span style="color: rgb(224, 222, 244); font-family: -apple-system, "system-ui", sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgba(38, 35, 58, 0.5); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">(3 theme extensions excluded)</span>

Hey, here is my List

Extension Author (truncated) Version
Bookmarks ale 13.4.2
vscode-mjml att 1.6.0
turbo-console-log Cha 2.10.4
path-intellisense chr 2.8.5
dart-code Dar 3.84.0
flutter Dar 3.84.0
vscode-eslint dba 2.4.4
xml Dot 2.5.1
gitlens eam 14.8.2
EditorConfig Edi 0.16.4
prettier-vscode esb 10.1.0
vscode-git-history fab 2.0.5
auto-rename-tag for 0.1.10
shell-format fox 7.2.5
copilot Git 1.171.0
copilot-chat Git 0.13.0
vscode-github-actions git 0.26.2
todo-tree Gru 0.0.226
rest-client hum 0.25.1
ionic Ion 1.70.0
jbockle-format-files jbo 3.4.0
syntax-project-pbxproj mar 0.1.3
vscode-xslt-snippets mar 0.1.0
rainbow-csv mec 3.11.0
vscode-azurefunctions ms- 1.13.4
vscode-azureresourcegroups ms- 0.8.4
vscode-docker ms- 1.29.0
vscode-language-pack-de MS- 1.87.2024022809
data-workspace-vscode ms- 0.5.0
azure-account ms- 0.11.6
live-server ms- 0.4.13
vsliveshare ms- 1.0.5905
gradle-language nac 0.2.3
angular-console nrw 18.17.0
quicktype qui 12.0.46
fabric8-analytics red 0.9.2
java red 1.28.1
vscode-commons red 0.0.6
vscode-xml red 0.26.1
LiveServer rit 5.7.9
markdown-preview-enhanced shd 0.8.11
even-better-toml tam 0.19.2
sort-lines Tyr 1.11.0
vscode-mdx uni 1.8.1
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.2.30
vscode-boot-dev-pack vmw 0.2.1
vscode-concourse vmw 1.52.0
vscode-manifest-yaml vmw 1.52.0
vscode-spring-boot vmw 1.52.0
vscode-gradle vsc 3.13.5
vscode-java-debug vsc 0.56.2
vscode-java-dependency vsc 0.23.5
vscode-java-pack vsc 0.25.15
vscode-java-test vsc 0.40.1
vscode-lombok vsc 1.1.0
vscode-maven vsc 0.44.0
vscode-spring-boot-dashboard vsc 0.13.1
vscode-spring-initializr vsc 0.11.2
volar Vue 2.0.4
change-case wma 1.0.0
JavaScriptSnippets xab 1.8.0
pretty-ts-errors Yoa 0.5.3
markdown-pdf yza 1.5.0
propertylist zho 0.0.2

Same, without nuxt - just a normal Vue3 monorepo setup on M2.

Output of Typescript module:

2024-03-04 08:38:44.922 [info] Starting TS Server
2024-03-04 08:38:44.922 [info] Using tsserver from: /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js
2024-03-04 08:38:44.922 [info] <syntax> Forking...
2024-03-04 08:38:44.922 [info] <syntax> Starting...
2024-03-04 08:38:44.922 [info] <semantic> Forking...
2024-03-04 08:38:44.922 [info] <semantic> Starting...
2024-03-04 08:38:45.796 [error] TSServer exited. Code: null. Signal: SIGBUS