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

Typescript Duplicate identifiererror after 3.6.1 mobx update #1362

Closed
mturki opened this issue Mar 1, 2018 · 4 comments
Closed

Typescript Duplicate identifiererror after 3.6.1 mobx update #1362

mturki opened this issue Mar 1, 2018 · 4 comments

Comments

@mturki
Copy link

mturki commented Mar 1, 2018

I have a Duplicate identifier 'require' error with my Typescript react native project when i run the tsc command :
node_modules/@types/node/index.d.ts(99,13): error TS2300: Duplicate identifier 'require'. node_modules/@types/react-native/index.d.ts(8618,14): error TS2300: Duplicate identifier 'require'.

Downgrading to mobx 3.5.1 solves the problem.

typescript version : 2.7.2

@mweststrate
Copy link
Member

The error doesn't mention anything related to mobx, but two other packages instead (and mobx doesn't depend on either of them). So I suspect this error originates from another update that occurred at the same time, or a mess in your node_modules.

Please reopen and provide a reproduction repo if you think this isn't the case and the issue is actually caused by MobX.

@mturki
Copy link
Author

mturki commented Mar 6, 2018

I tried to clear node_modules without effect. Only a downgrade to 3.51 fix my issue. I create a minimal project from scratch to reproduce it. And now i have a more explicit mobx related error when i run tsc :
node_modules/mobx/lib/utils/utils.d.ts(1,23): error TS2688: Cannot find type definition file for 'node'.
Any idea?

I posted my minimal code there : https://github.com/mturki/testMobx

@mweststrate
Copy link
Member

Thanks @mturki. That is a different error indeed, also reported in #1387. Fixed in 3.6.2

@mturki
Copy link
Author

mturki commented Mar 12, 2018

I just tested 3.6.2, and it seems to work well now. Thanks @mweststrate!

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