Closed
Description
Applications created using the current "init templates" for TypeScript may fail building with the following error message:
node_modules/@types/node/index.d.ts:97:11 - error TS2300: Duplicate identifier 'IteratorResult'.
97 interface IteratorResult<T> { }
~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6
41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
~~~~~~~~~~~~~~
'IteratorResult' was also declared here.
node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6 - error TS2300: Duplicate identifier 'IteratorResult'.
41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
~~~~~~~~~~~~~~
node_modules/@types/node/index.d.ts:97:11
97 interface IteratorResult<T> { }
~~~~~~~~~~~~~~
'IteratorResult' was also declared here.
This can be fixed by removing the @types/node
dependency declared in package.json
, or upgrading it from 8.10.45
to 8.10.52
, by running the following command:
$ npm install @types/node@8
+ @types/[email protected]
updated 1 package and audited 558 packages in 2.961s
found 0 vulnerabilities