isaacs / node-lru-cache

A fast cache that automatically deletes the least recently used items
http://isaacs.github.io/node-lru-cache/
ISC License
5.35k stars 353 forks source link

LRU Cache is not a constructor issue in Microsoft Office addin #336

Closed Peterhague closed 4 months ago

Peterhague commented 6 months ago

Hi I'm developing an Excel addin via the yeoman generator, which includes LRU Cache package as a dependency (not sure of which of the dependencies in pakcage.json). The code now throws an error (Typeerror: LRU Cache is not a constructor) on running npm start to run the app.

The code stopped working some time between evening GMT of Thursday and 9am GMT Friday - I can see that there was a new version of LRU Cache around that time so assume the issue is related to that.

Can you advise at all?

Many thanks

Peter

isaacs commented 6 months ago

What does npm ls lru-cache output?

What package manager are you using?

Something in your dep tree is getting a version that it doesn't know how to use. This is likely a package manager issue.

fridaystreet commented 1 week ago

seems like this is a pretty ongoing/reoccuring issue with this library, quite a few historical issues with the same thing. I realise it's package manager related, but I've never seen this with any other package. Is there any chance maybe there is something to do with this package that maybe could be a bit more compatible?