Closed
Description
The tsc
invocation here seems sensitive to unrelated broken types present in the users node_modules/@types
folder.
I believe TypeScript checks types in node_modules/@types
, and it's not uncommon for these to be broken in some way (duplicate identifiers when multiple versions of the same package are present in a monorepo, 3rd party type incompatibilities and so on).
The issue is solved by passing the --skipLibCheck
flag to tsc
. Or alternatively, perhaps invoking tsc in some temporary cwd
that is not the user's project, where we're not going to trigger random errors from npm dependencies.