Have followed the starter instructions but cannot start the barebones app:
Failed to compile.
/Users/benjaminwatts/node_modules/@types/graphql/subscription/subscribe.d.ts
(17,12): Cannot find name 'AsyncIterator'.
Any ideas?
I'm having a similar issue but with an app on Heroku.
Failed to compile
/app/src/foundation/components/App/tests/App.test.tsx
(5,1): Cannot find name 'it'.
By adding "esnext.asynciterable" to tsconfig.json, it will work.
"lib": ["es6", "dom", "esnext.asynciterable"],
lib: ["esnext"]
solves the problem
we can close this
Isn't adding lib: "esnext" dangerous?
E.g. esnext even includes flatMap...
It only tells TypeScript to assume these APIs will be available in the browser, but doesn't provide polyfills. It will easily break your app in most browsers.
By adding "esnext.asynciterable" to tsconfig.json, it will work.
"lib": ["es6", "dom", "esnext.asynciterable"],
oh, thanks!
Most helpful comment
By adding "esnext.asynciterable" to tsconfig.json, it will work.