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

Unknown problem with vue language server crash #2724

Open
wokalek-work opened this issue Feb 25, 2021 · 13 comments
Open

Unknown problem with vue language server crash #2724

wokalek-work opened this issue Feb 25, 2021 · 13 comments

Comments

@wokalek-work
Copy link

  1. Install vscode extention.
  2. Go to .vue file
  3. Get error Couldn't start client Vue Language Server.
  4. Zuck.

Google setup for vetur extention for vscode.

  1. Update vetur.config.js from this.

    module.exports = {
        projects: [{ root: './nuxt' }]
    }

    To this

    module.exports = {
        projects: [{ root: './nuxt', globalComponents:  './components/**/*.vue' }]
    }
  2. Nothing changes.

  3. Go to vscode settings.

  4. Found vetur.dev.vlsPath.

  5. Install globally vls npm install vls -g

  6. Setup in vscode settings.json:

    "vetur.dev.vlsPath": "C:/Users/admin/AppData/Roaming/nvm/v14.15.3/vls.cmd"
  7. Doesn't work at all.

    The Vue Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted
    

How do I get this thing to work? Is it really possible to do it?

@LinusBorg
Copy link
Member

I get that you're frustrated, but maybe reconsider the approach you take here with the issue title and all...

@wokalek-work
Copy link
Author

I get that you're frustrated, but maybe reconsider the approach you take here with the issue title and all...

But what did I do wrong?

@LinusBorg
Copy link
Member

Hard to say. Won't discuss any further with that title up.

@yoyo930021
Copy link
Member

yoyo930021 commented Feb 26, 2021

I'm sorry you're having problems.
but your message does not allow us to help you.

  1. You don't need to set vetur.dev.vlsPath and npm install vls -g.
  2. Use Vetur: Show Output Channel command and paste message here.
    It should contain the error message of crash.
  3. Use issue template, it will provide more debugger information for help us.

The computer world is complex.
We will do our best to fix the possible problems, but we will need your help.
If you can provide more information, you can help us be better together.

@igolka97
Copy link

igolka97 commented Mar 5, 2021

Hello @yoyo930021, thank you for contributing to this issue. I just got the same behavior. As you said earlier I tried to run Vetur: Show Output Channel command, I got following: Command 'Vetur: Show Output Channel' resulted in an error (command 'vetur.showOutputChannel' not found)

Tried to run VLS on clean vue-cli project and it works, so I getting this error only at my project with quasar framework.
How I can help you to find a solution?

One thing that I got it from VSC DevTools:
Снимок экрана 2021-03-05 в 23 52 26

@igolka97
Copy link

igolka97 commented Mar 6, 2021

@vostokwork change the title of this issue to something descriptive, if it possible, please :)

@yoyo930021 yoyo930021 changed the title I hate this thing. Unknown problem with vue language server crash Mar 6, 2021
@yoyo930021
Copy link
Member

Hello @yoyo930021, thank you for contributing to this issue. I just got the same behavior. As you said earlier I tried to run Vetur: Show Output Channel command, I got following: Command 'Vetur: Show Output Channel' resulted in an error (command 'vetur.showOutputChannel' not found)

Tried to run VLS on clean vue-cli project and it works, so I getting this error only at my project with quasar framework.
How I can help you to find a solution?

One thing that I got it from VSC DevTools:
Снимок экрана 2021-03-05 в 23 52 26

Hmm, the command will failed when Vue language server crash.....
Can you find it in Output -> Vue Language Server in vscode?

If you can provide a repro case, I can study it quickly.
In the future,we will try to collect errors remotely with the user's allow.

@igolka97
Copy link

igolka97 commented Mar 6, 2021

@yoyo930021 no, there no Vue Language Server at Output dropdown.

Right now I cant find a way how to recreate my case for you. I'll try more in future.

Also I found interesting thing: I duplicate my project folder one-to-one/as-is to one folder up:
was: ~/user/git/project-name/frontend
become: ~/user/git/frontend

And VLC now starting. After that I decided to play around that. But not matter I tried to do I couldn't find out what going wrong.

But anyway, some features are still broken: for example, I couldn't go to definition to computed prop.

So i'm so confused about that magic happens... So, unfortunately, I'm forced to do my job at WebStorm for a while...

UPDATE

OMG, I found out what going wrong, feels like a fool.

at ~/user/git/project-name I put vutur.config.js, where was a syntax mistake.

Below how it's looking right now:

module.exports = {
  settings: {
    "vetur.useWorkspaceDependencies": true,
    "vetur.experimental.templateInterpolationService": true
  },
  projects: [
    './frontend',
  ]
}

And now it's working, but I cant use go to definition to most of data props and computed props.
Any workaround here?

@vostokwork check your vutur.config.js config. And share your folder structure my be it could help.

Seems that go to definition issue is about experimental interpolation service and do not related to this one. So, this issue is resolved for me now, thanks again for contributing

@yoyo930021 yoyo930021 self-assigned this Mar 12, 2021
@yoyo930021
Copy link
Member

yoyo930021 commented Mar 23, 2021

Hello everyone, I make a special version for debugging.
This version will send the error to sentry and I can study it.

If anyone can try to use it, I would be grateful.

vetur-0.33.1.vsix.zip

Steps:

  1. Uninstall the original extension.
  2. Download zip and unzip
  3. https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix
  4. Test it.
  5. crash
  6. comment in this post.

@yogithesymbian
Copy link

yogithesymbian commented Mar 29, 2021

Hello everyone, I make a special version for debugging.
This version will send the error to sentry and I can study it.

If anyone can try to use it, I would be grateful.

vetur-0.33.1.vsix.zip

Steps:

  1. Uninstall the original extension.
  2. Download zip and unzip
  3. https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix
  4. Test it.
  5. crash
  6. comment in this post.

i have try the steps and still crash , sorry if i wrong , i dont understand

#2820 (comment)

Screen Shot 2021-03-29 at 2 39 02 PM

@PotatoesFall
Copy link

PotatoesFall commented Jun 9, 2021

I had this problem as well and fixed it in the following way

In vetur.config.js before

// vetur.config.js
/** @type {import('vls').VeturConfig} */
module.exports = {
    settings: {},
    projects: [
        "./packages/repo1",
        {
            // many comments here from template
        }
    ]
};

Note the empty {} curly braces. I commented them out:

In vetur.config.js after

// vetur.config.js
/** @type {import('vls').VeturConfig} */
module.exports = {
    settings: {},
    projects: [
        "./packages/repo1",
        // {
            // many comments here from template
        // }
    ]
};

and then I no longer got the error. Hope this helps!!
Obviously there are settings and more projects and a ton of comments in my actual vetur.config.js, I removed them for simplicity.

@nickpreston24
Copy link

nickpreston24 commented Mar 12, 2022

I applied the first answer (setting the root fixed mine)

Google setup for vetur extention for vscode.

  1. Update vetur.config.js from this.
    module.exports = {
        projects: [{ root: './nuxt' }]
    }

, and also doing this:

Resolved using "vetur.experimental.templateInterpolationService": false in vetur.config and VSCode settings + reloading the editor.

@wokalek
Copy link

wokalek commented Mar 24, 2022

@igolka97 still have this issue.

Structure:

image

vetur config:

module.exports = {
    projects: [{
        root: './nuxt',
    }]
}

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

8 participants