Closed Shinigami92 closed 3 years ago
See https://github.com/johnsoncodehk/volar/discussions/437 🤔 Could be related
Replied, reproduce wanted. :S
I'm down from 3780
TS Errors to "only" 420
TS Errors 😔
There are only mainly two types of errors
Normal variables/functions not found returned by the setup function
error TS2304: Cannot find name 'xxx'.
v-slot:activator="{ on }"
There is also one $t
👀
I think I will update the repro and tell you when it's ready
The second error occurred through tsconfig.json
setting noUnusedLocals
to true
Setting it to false
, I'm down to 327
errors.
Could you fix that? I would like to stay on "noUnusedLocals": true
... Will dig further down for the other errors ...
Could you fix that? I would like to stay on
"noUnusedLocals": true
I think this is correct report, if you have no use { on }
.
I think this is correct report, if you have no use
{ on }
.
But I have... that's the point ^^, otherwise I would remove it
The other errors are really random and I currently don't find out why the occur 🤔
I will update the repro now, but everything in it works...
Also before last thursday I didn't had all these issues, then some updates in volar
and vue
/vscode
language server and vue-tsc
happend, and after that it broke.
But I also cannot pin versions or so. When I just update something and recreate the yarn.lock
after that it's broken. 🙁
I would like to rollback to last thursday...
I only see the declared but never read problem.
I'm away for next hour. Not sure I will come back today, otherwise see you tomorrow 👋
Thx for all your work 💚
It's because line 7 v-on="{ ...tooltip, ...menu }"
don't have event name, so volar ignore this expression. What is the nameless event behavior?
I have one more step to success! I found out that the issue that all these variables cannot be found is based on one sub-sub component! This component uses some really special stuff, but seems to crash the parser and therefore cannot be compiled leading to un-compiled code for the components using it traversing up the tree to the root views. All views/components that has not this component in use anywhere are working just fine.
Now I need to find out what exactly the problem is.
It has something to do with following code
v-btn(icon, @click="currentPreviewIndex--", :disabled="currentPreviewIndex <= 0")
//- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^~~~
But even when I try to reproduce it, it just works I'm so confused
It took me 2-3 hours to find me this code line
I think my workaround would be for now to move this condition to a computed and then use that Edit: ... yes the workaround works, no errors anymore
It seem a pug parser problem, and working good in html. Will check it.
We use HTMLDocument from vscode-html-languageservice
to parse SFC, it detected <=
is a html start tag, so all behind SFC blocks is broken. Don't know how to handle yet. :S
Please track https://github.com/johnsoncodehk/volar/issues/451.
My companies project uses vue-tsc
~0.3.0
and vscode-vue-languageservice~0.27.7
Last week everything worked, but today (after weekend) I just runrm yarn.lock && yarn
to update all dependencies and now when I runyarn vue-tsc --noEmit
I get3780
TS errors.They mostly look like
TS2304: Cannot find name 'XXX'.
orTS2306: File 'XXX' is not a module.
But even when I pin the both deps, I still get these errors. Only when I reset my
yarn.lock
andpackage.json
and then runyarn install --immutable
then I don't get the errors.But this or that way, vite dev server shows everything works normally.