Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server crash, resolved by upgrading typescript #1054

Closed
3 tasks done
zbjornson opened this issue Jan 9, 2019 · 6 comments
Closed
3 tasks done

Server crash, resolved by upgrading typescript #1054

zbjornson opened this issue Jan 9, 2019 · 6 comments

Comments

@zbjornson
Copy link

zbjornson commented Jan 9, 2019

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Win 10 x64
  • Vetur version: 0.14.5
  • VS Code version: 1.30.2

Problem

This is sort of a lame issue report, but I was getting a consistent crash ("the vue language server crashed 5 times in the last 3 minutes") in a large project, occurring in the typescript package running within vetur's language server. When I upgraded typescript from 2.8.4 (specified in package.json) to latest (3.2.2), the crash went away. That also seems to have improved performance significantly. You might want to consider officially upgrading that package.

@WORMSS
Copy link

WORMSS commented Jan 10, 2019

I just wanted to add on to what @zbjornson said,
I was having this issue too, but found that due to our workflow we had both typescript installed as a package for the project, but also needed typescript installed globally for the IDE, (I forget why, but we do).

But this fact was forgotten for a few days and was scratching my head why I was still getting old issues for typescript being reported.

Now I have global and local versions of typescript installed @ 3.2.2 and everything seems to be fine so far. 🤞

@octref
Copy link
Member

octref commented Jan 10, 2019

Here are some context why it's still in 2.8:

How did you upgrade to 3.2.2? Did you go to ~/.vscode/extensions/octref.vetur.something and installed TypeScript manually under /server?

The new vetur.dev.vlsPath could also help you: https://github.com/vuejs/vetur/blob/master/.github/CONTRIBUTING.md

It's simple as:

  • Clone Vetur
  • Install latest TS under /server
  • Build Vue Language Server (/server)
  • Point your VS Code installation of Vetur to it

@zbjornson
Copy link
Author

@octref thanks for the context. You linked #913 twice btw. That talks about TS 3.0, so perhaps whatever that issue was is resolved now in 3.2. I don't see high CPU usage currently.

Yes on the 2nd part, I ran yarn add typescript@latest inside .vscode/extensions/octref___/server. Thanks for the vlsPath tip! That'll help as I'd like to see what I can do to work on #547 (major issue for our large Vue project).

@octref
Copy link
Member

octref commented Jan 10, 2019

Yeah, Vetur should be able to work with any version of TypeScript. Maybe I should allow another path pointing to a specific ver of TypeScript, like VS Code:

{
   "typescript.tsdk": "/usr/local/lib/node_modules/typescript/lib"
}

And I meant to link to #922.

@octref octref mentioned this issue Feb 14, 2019
3 tasks
@renestalder
Copy link

@zbjornson Oh god, many thanks for the steps provided. I never got TypeScript working since I installed Vetur. Just updated TypeScript of Vetur to 3.4.5 with the steps provided in this ticket and the extension now finally works. ❤️

@octref
Copy link
Member

octref commented May 9, 2019

BTW now "vetur.useWorkspaceDependencies": true will use node_modules/typescript over bundled TS version (which is 3.3.4000).

@octref octref closed this as completed May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants