A package using peer dependencies throws errors only when using astro check
#976
Labels
needs triage
Issue needs to be triaged
astro check
#976
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
To use
@upstash/redis
package, you create a client objectWe require this redis client object in the
@upstash/ratelimit
packageHowever, this gives the following error, and specifically only when using
astro check
.In the reproduction repo, you can try
tsc
which only includes thesrc/code.ts
file. And it does not give a type error.We have other integrations and we have only seen this error when using
astro check
. We can fix the issue with hacky methods but I think there might be a problem in the linter itself.The ratelimit config object is basically this
And
@upstash/redis
is a peer dependency in@upstash/ratelimit
.We discovered it thanks to this issue in our repo.
What's the expected result?
To not give any errors, like the tsc
Link to Minimal Reproducible Example
https://stackblitz.com/edit/vitejs-vite-lsvyuz?file=src%2Fcode.ts
Participation
The text was updated successfully, but these errors were encountered: