-
-
Notifications
You must be signed in to change notification settings - Fork 638
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
TypeError: LRU is not a constructor #2619
Comments
@wellwelwel I bumped lru-cache in named-placeholders ( need to publish it, last release action failed for some reason ) Couple of notes:
|
Looking at the LRU Cache breaking changes: v9
We could adapt the import. v10
It just changes a type (TypeScript) from |
Same error for me: "LRU is not a constructor" but manually installing lru-cache at v8.0.0 did not resolve for me
|
I have same problem. How to solve it? |
I installed "lru-cache": "^11.0.0", and it fixed the issue |
I believe there is a conflict version with the lru-cache package. After some digging noticed that lru-cache v8.0.0 is the only version that exports the class as "default" and that's how is refernced in the code
but if for some reason there is a version conflict on that library, which in my case happened you get that error. I also noticed that mysql2 has this dependeny "named-placeholders": "^1.1.3" but "named-placeholders dependecy is "lru-cache": "^7.14.1".
I'm nort sure why npm is not crying about this but in my case I'm getting lru-cache "5.1.1" which is even worst.
I fixed the issue by manually installing lru-cache v8.0.0
The text was updated successfully, but these errors were encountered: