Skip to content

actions/glob: Cannot find name 'AsyncGenerator' #504

@SaschaMann

Description

@SaschaMann

Describe the bug
I installed @actions/glob using npm i @actions/glob. In a function, I try to call the following:

    const projectFiles = await (await glob.create('**/Project.toml')).glob()

as explained in the glob docs

When I run npm run build, it fails with the following error:

> tsc

node_modules/@actions/glob/lib/internal-globber.d.ts:27:22 - error TS2304: Cannot find name 'AsyncGenerator'.

27     globGenerator(): AsyncGenerator<string, void>;
                        ~~~~~~~~~~~~~~

node_modules/@actions/glob/lib/internal-globber.d.ts:36:22 - error TS2304: Cannot find name 'AsyncGenerator'.

36     globGenerator(): AsyncGenerator<string, void>;
                        ~~~~~~~~~~~~~~


Found 2 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! setup-julia@1.1.6 build: `tsc`
npm ERR! Exit status 2

You can find the full context, and CI error logs showing the same error, here: julia-actions/setup-julia@ead3831

Expanding it to

const globber = await glob.create('**/Project.toml')
const files = await globber.glob()

did not fix the error.

To Reproduce
See above.

Expected behavior
I was expecting to receive a list of files that match the glob **/Project.toml

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingglob

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions