vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 593 forks source link

Vetur features stop working when I specify a vetur.config.js #3162

Open ericdrobinson opened 3 years ago

ericdrobinson commented 3 years ago

Info

Problem

If the vetur.config.js file as shown above exists in the project root, Vetur features fail to activate. The Vue Language Server output does contain the following message:

Vetur initialized

But that is all. No Vetur features beyond syntax highlighting appear to work.

If the contents of vetur.config.js are commented out, then the output shows:

Vetur initialized
[INFO ] Find node_modules paths in /app - 2110ms
[INFO ] Loaded bundled typescript@4.3.2.
[INFO ] Loaded bundled prettier.
[INFO ] Loaded bundled @starptech/prettyhtml.
[INFO ] Loaded bundled prettier-eslint.
[INFO ] Loaded bundled prettier-tslint.
[INFO ] Loaded bundled stylus-supremacy.
[INFO ] Loaded bundled @prettier/plugin-pug.

Enabling the Trace: Server setting to verbose in the extension settings shows lots of message traffic with, presumably, the extension host. I can clearly see hover requests show up but responses are always empty arrays.

Reproducible Case

I do not yet have this information available. What I have found is that simply specifying one of the projects listed in the config shown above and leaving the settings out of it will result in this failure state. The moment that I comment out everything (effectively remove the vetur.config.js file altogether), many features begin to work again (although some of the template interpolation warnings appear to skip some of the TypeScript type declarations).

yoyo930021 commented 3 years ago

Where is vue package? It isn't a regular monorepo.

ericdrobinson commented 3 years ago

The vue package is installed in the top-level node_modules folder. It is v2.6.11 with a patch applied.

ericdrobinson commented 3 years ago

I should also note that I found a path bug in the initial config while reviewing this issue. Fixing that path bug (don_htmldom_html) didn't fix the issue at all.

The Vue Language Server output still gets stuck at "Vetur initialized".

ericdrobinson commented 3 years ago

The only thing I can think at the moment is that perhaps vetur is finding the tsconfig.json files correctly but not following the inheritance to build the "full config"?

ericdrobinson commented 3 years ago

Oh, I should also mention that removing one of the projects there so that it only sees, say, the one defined at dom_html/panel ends with the same results...

yoyo930021 commented 3 years ago

If you can provide a minimal repro case, we can study quickly. https://github.com/vuejs/vetur/blob/master/.github/NO_REPRO_CASE.md