Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error TS2300: Duplicate identifier 'IteratorResult'. #48

Open
GasserJC opened this issue Oct 26, 2020 · 1 comment
Open

error TS2300: Duplicate identifier 'IteratorResult'. #48

GasserJC opened this issue Oct 26, 2020 · 1 comment

Comments

@GasserJC
Copy link

GasserJC commented Oct 26, 2020

Followed the readme directions - caused this error. I found a few similar issues elsewhere, where updating TS, or creating a files section in the tsconfig.ts will solve the issue, however, these solutions did not work in my situation. Does anyone know what this would cause? TS Version: 4.0.3

This happens after npm run build

node_modules/@types/node/index.d.ts:167:11 - error TS2300: Duplicate identifier 'IteratorResult'.

167 interface IteratorResult { }
~~~~~~~~~~~~~~

node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6
41 type IteratorResult<T, TReturn = any> = IteratorYieldResult | IteratorReturnResult;
~~~~~~~~~~~~~~
'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 | IteratorReturnResult;
~~~~~~~~~~~~~~

node_modules/@types/node/index.d.ts:167:11
167 interface IteratorResult { }
~~~~~~~~~~~~~~
'IteratorResult' was also declared here.

@mochadwi
Copy link

mochadwi commented Jan 4, 2021

This is fixed by upgrading typescript & node to the latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants