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! [email protected] build: `tsc`
npm ERR! Exit status 2
You can find the full context, and CI error logs showing the same error, here: https://github.com/julia-actions/setup-julia/commit/ead3831d7a64e71c65c3148b5b395273d5812199
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
You might be using an older version of tsc?
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
Closing out as this is resolved!