Skip to content
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: Class constructor LRUCache cannot be invoked without 'new' #79

Closed
markuzzi opened this issue Feb 1, 2020 · 2 comments
Closed

Comments

@markuzzi
Copy link

markuzzi commented Feb 1, 2020

With LRUCache updated to version 5.1.1, the vue component compiler utils throw the error
TypeError: Class constructor LRUCache cannot be invoked without 'new'

I think this is due to line 9 in lib/parse.ts:

const cache = require('lru-cache')(100)`;

If this would be changed to

const LRUCache = require('lru-cache');
const cache = LRUCache(100);

I think this would fix the problem.

Does it make sense?

@haoqunjiang
Copy link
Member

This project depends on lru-cache v4 at the moment. PR's welcome.

@lenkog
Copy link
Contributor

lenkog commented Mar 26, 2020

PR: #83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants