language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

VSCode extension shows ts-plugin(2792) for .vue files exactly one level under src directory

Open dwgray opened this issue 9 months ago • 0 comments

This is reproduction for me on a plain templated app created using yarn create vite vue-lang-test --template vue-ts

The App.vue file is parsing correctly, the components/HelloWorld.vue file is showing Cannot find module '@/helpers/GetMenuContext'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?ts-plugin(2792) on the import line.

No amount of restarting vs, ts language service, etc. seemed to help.

Rolling back to 1.8.27 solves this for me. All of the 2.0.* versions seem to have this problem.

I originally found this on an app with a somewhat more complex directory structure, which leads me to believe it's just .vue files (and thus related to the vue language service rather than just .ts) and that it's only files exactly one level below the src director (or two below the *.tsconfig file.

root
--src
---- assets
---- components
------sharedcomp1.vue
------sharecomp2.vue
---- helpers
---- pages
------page1
------App.vue
------components
--------comp1.vue
--------comp2.vue
------page2
...
tsconfig.json

All of the imports in the .vue files in the components directory show the error.

None of the .ts files in the components directory show this error. None of the .ts or .vue files under the pages directory (which are at least one level more nested) show this error. While my app doesn't have this by default, adding another level of nesting under components doesn't show the error in the .vue files and adding a .vue file directly under pages does show the error.

Version: 1.88.1 (user setup)
Commit: e170252f762678dec6ca2cc69aba1570769a5d39
Date: 2024-04-10T17:41:02.734Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631

dwgray avatar Apr 28 '24 23:04 dwgray