idb icon indicating copy to clipboard operation
idb copied to clipboard

Cannot find name 'WeakKey'.

Open saipraveen81 opened this issue 1 year ago • 6 comments

Hi, I'm getting this error while running in the DevOps pipeline.

node_modules/idb/build/wrap-idb-value.d.ts:2:53 - error TS2304: Cannot find name 'WeakKey'. 2 export declare const reverseTransformCache: WeakMap<WeakKey, any>;

Please let us know how to resolve this issue

saipraveen81 avatar Dec 18 '24 04:12 saipraveen81

We are also getting same issue while running devops pipeline, while it was working fine till 2 days back. **Error: node_modules/idb/build/wrap-idb-value.d.ts:2:53 - error TS2304: Cannot find name 'WeakKey'.

2 export declare const reverseTransformCache: WeakMap<WeakKey, any>;**

we are using following version of IDB and typescript "idb": "~8.0.0", "typescript": "~4.8.2"

rvCalance avatar Dec 18 '24 06:12 rvCalance

Can someone make a minimal reproduction of this? Eg on a codesandbox or whatever

jakearchibald avatar Jan 31 '25 19:01 jakearchibald

Image

Mohib-rexon-software avatar May 08 '25 06:05 Mohib-rexon-software

Image I also got this error and i need to manually change WeakKey to any to resolve the issue, can anyone resolve the issue. "idb": "^8.0.2",

Mohib-rexon-software avatar May 08 '25 06:05 Mohib-rexon-software

Can someone make a minimal reproduction of this? Eg on a codesandbox or whatever

jakearchibald avatar May 08 '25 07:05 jakearchibald

Have to upgrade to at least TS 5.2 and then you get WeakKey

NullVoxPopuli avatar Jul 27 '25 15:07 NullVoxPopuli