Closed lacherogwu closed 3 weeks ago
I think you just need skipLibCheck: true
You will get errors from your server even if you're only type-checking your client, that works as designed.
As you can see there is skipLibCheck: true
in the tsconfig.json, that doesn't help.
and If I would run tsc --noEmit
on the server I wouldn't get these errors since I skipLibCheck: true
but still if I run vue-tsc
on the client and because of this type import in the client from the server it would print these errors, even though it should ignore (i guess)
but those who still have this problem and want quick-fix I wrote a small utility that helps to ignore those errors, you can check it here β tsc-exclude
it works great π
Hey there! :wave:
We appreciate the time you've taken to write this issue.
Unfortunately, we don't have the capacity to assist here as this issue does not seem to be related to tRPC itself.
Please feel free to re-open if you disagree or post in our help channels on Discord or in our GitHub Discussions.
Yeah I feel you, thanks for your time, I might fill up an issue on typescript it might be the right place
This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.
Provide environment information
Describe the bug
When using
vue-tsc
for linting, I'm encountering errors from thenode_modules
within my server, as well as type errors related to the server. However, I'm only linting the client-side code.here are example of the errors
Link to reproduction
https://codesandbox.io/p/sandbox/hardcore-goldstine-vhhxrl
To reproduce
Have 2 folders
npm create vite
install trpc on server & client install amazon-sp-api or have any type check error, like unused variable or any else
run vue-tsc on client folder
Additional information
The reason of this error is because we need to import the AppRouter type from the server, which causing the
vue-tsc
typechecker to include stuff from the serverI've been searching extensively online but couldn't find a solution. I've tried various combinations with the
tsconfig
to exclude certain files, but nothing has worked so far.π¨βπ§βπ¦ Contributing
Funding