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

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

Closed
SaschaMann opened this issue Jun 25, 2020 · 3 comments
Closed

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

SaschaMann opened this issue Jun 25, 2020 · 3 comments
Labels
bug Something isn't working glob

Comments

@SaschaMann
Copy link

SaschaMann commented Jun 25, 2020

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

@SaschaMann SaschaMann added the bug Something isn't working label Jun 25, 2020
@ericsciple
Copy link
Contributor

You might be using an older version of tsc?

@SaschaMann
Copy link
Author

SaschaMann commented Jun 25, 2020

I used "^3.5.1" as set by the action template when I created the action from the template. I updated it to ^3.6.4 as specified by the latest version of the action template and now it works. Thanks :)

Would it be possible to add a minimal version requirement to the docs of glob or the toolkit somewhere? Ideally in a way that I can't even install it via npm without updating typescript

@thboop thboop added the glob label Jun 25, 2020
@thboop thboop closed this as completed Apr 30, 2021
@thboop
Copy link
Collaborator

thboop commented Apr 30, 2021

Closing out as this is resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working glob
Projects
None yet
Development

No branches or pull requests

3 participants