Skip to content

Cannot read properties of undefined (reading 'withFileTypes') #538

@heartforit

Description

@heartforit

Hi my friend,

just wanted to let you now that code on current version from npm "^10.3.2" has this beauty in it which leads to the error message given in the title:

node_modules\glob\dist\cjs\src\glob.js:65:37

    constructor(pattern, opts) {
        this.withFileTypes = !!opts.withFileTypes;

If you call const g = new Glob("./data/whatever/*.json") without options param, it leads to this error.

Kind regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions