I just wasted a day on this, so I thought I would get it down incase anyone else is experiencing it.
Opened a vue
3 project and got the following error:
The JS/TS language service immediately crashed 5 times. The service
will not be restarted….
And then it listed a bunch of possible extensions that might be causing it – one of which is Vue.volar
.
Disabling the Vue - Official
extension does stop the crash, but then we have no vue
or TypeScript
language services in VS Code.
I narrowed it down to destructuring objects in HTML attributes in a vue
template:
<RouterView v-slot="{Component}">
<Transition name="fade" appear>
<component :is="Component" />
</Transition>
</RouterView>
If you change that to
<RouterView v-slot="props">
<Transition name="fade" appear>
<component :is="props.Component" />
</Transition>
</RouterView>
Its fine – but a workaround….
2
Answers
Turns out the issue started in the
2.0
release ofVue - Official
You can roll
Vue - Official
back to older versions.Vue - Official
in the VS Code extensions panel.Install another version...
For me, the earliest working build was
1.8.27
I’m facing the same problems after migrating to the new extension version. I also downgraded the version and it helped, but now I’m getting new TS errors with imports for which I’m using aliases, looks like some recent updates to the Vue ecosystem produced a bunch of problems (especially for TS projects). I do hope it will be fixed pretty soon. Thanks for sharing your knowledge!