New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error TS2688: Cannot find type definition file for 'keyv'. For version 4.2.0 #528
Comments
@nitish24p - thanks and we are looking into this. |
@nitish24p - one thing is that with the latest you should not be using the @types/keyv. have you tried removing it? |
Hi @jaredwray that will be my last option since i will have to go and make updates to all libraries on which keyv is dependant on. But will want to keep that option open too |
Do you know what specific libraries are referencing the older versions? Happy to dig in with you to get them updated. |
So i have My App
|
react-native-screens@2.17.1 **Custom Forked Version**
└─┬ release-it@13.7.2
└─┬ got@11.8.2
└─┬ @types/cacheable-request@6.0.2
└── @types/keyv@4.2.0 So react-native-screens basically does a build which calls the typescript compiler and that fails. |
@nitish24p - we have seen this a bunch as cacheable-request is now at version 10 and got is on 12. Both of them are now ESM native. If you upgrade |
Hi, i'm getting below error. |
@samwi this looks pretty old. I also heard Electron is being deprecated correct? |
@samwi and @vasudevan242 - would recommend either getting them to upgrade or seeing if you can pull the file directly from Keyv (https://github.com/jaredwray/keyv/blob/main/packages/keyv/src/index.d.ts) as we have not used Also, the version of |
@jaredwray could you publish @types/keyv@4.2.0 back please? all serverless framework versions are using at least got@11.8.5.
even if I update serverless framework to v3, latest serverless also uses got@11.8.5. I believe the millions of project will be affected and not able to be running after this removal. |
@jaredwray After I updated my node version from v14 to v16, I could get a build successfully. I guess node v14 doesn't support ESM module import. |
@azmicirit It got removed in this issue: DefinitelyTyped/DefinitelyTyped#62793 Will this workaround mentioned in above issue works? |
I had to explicitly had keyv at 3.1.14 as dev dependencies for this to work at the moment. |
@alphmth I did same thing what @nitish24p did and updated node.js version to v16 and then it just worked.
|
Even overrides isn't really a solution. Suggestion to:
|
electron depends on electron/get, which is stuck on got@11 since got@12 only publishes ESM. @jaredwray Would you please consider either deleting @types/keyv@4.2.0 and deprecating the prior version (@types/keyv@3.1.4) or publishing a new @types/keyv@4.2.1 that includes an index.d.ts file to not break typescript builds? As an aside, I'd argue electron is the most active desktop ui framework and is definitely not deprecated. Take a look at its activity https://github.com/electron/electron/commits/main |
@mesner - We have re-opened this and looking at what it would take to re-publish to types to fill this gap. |
This wasn't actually solving the TS issues we're seeing and we're going to have to wait until jaredwray/keyv#528 is resolved.
@kanadgupta @mesner @mmcshinsky-bitgo - merging and will release the changes in the next 48 hours. |
@jaredwray it doesn't look like @types/keyv got updated. npm is still pointing to 4.2.0 and missing index.d.ts: |
@thorsent there is a discussion here on it: DefinitelyTyped/DefinitelyTyped#62793 |
Type definition missing for 4.2.0
One of my projects has a dependency on keyv, when the typescript compiler runs it finds that 4.2.0 doesnt have the index.d.ts file.
There was a publish made 16 hours ago post which builds for me have started failing.
https://registry.npmjs.org/@types/keyv mentions the versions installed, and the package to the tar file is https://registry.npmjs.org/@types/keyv/-/keyv-4.2.0.tgz
Either i can force resolution to a lower version or maybe you could push 4.2.0 with the index.d.ts file or mention a migration strategy.
Thanks
Steps To reproduce
The failed message should say something around the line of
bob build
failed. This is caused by @react-native-community-package/bob, where it runs the tsc build command as mentioned on the bottom line and it will fail.https://github.com/callstack/react-native-builder-bob/blob/v0.17.1/src/targets/typescript.ts#L130
The text was updated successfully, but these errors were encountered: