I have a typescript repo that fails to build on my machine with the error...
$ tsc --pretty -p tsconfig.json
../../../../../../node_modules/@types/graphql/subscription/subscribe.d.ts:17:12 - error TS2304: Cannot find name 'AsyncIterator'.
17 ): Promise<AsyncIterator<ExecutionResult> | ExecutionResult>;
~~~~~~~~~~~~~
../../../../../../node_modules/@types/graphql/subscription/subscribe.d.ts:29:12 - error TS2304: Cannot find name 'AsyncIterable'.
29 ): Promise<AsyncIterable<any>>;
~~~~~~~~~~~~~
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I can't find any mention of @types/graphql when I grep through the node_modules. I do find AsyncIterator in the typescript module however...
when I run the build in a docker container in ubuntu, it passes ok, but on my local OSSierra machine I am getting this error. I have found fixes online that say to add "esnext" to the libs in tsconfig.json, and this does appear to work, but this repo is not under my control and I still have no explanation for why this is happening. Any ideas?