Skip to content

TypeError: Class constructor LRUCache cannot be invoked without 'new' #79

Closed
@markuzzi

Description

@markuzzi

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions