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

Developing in home dir causes type issues #287

Closed
shramee opened this issue Dec 22, 2022 · 0 comments · Fixed by #288
Closed

Developing in home dir causes type issues #287

shramee opened this issue Dec 22, 2022 · 0 comments · Fixed by #288
Assignees
Labels
bug Something isn't working OnlyDust Open for OnlyDust contributors

Comments

@shramee
Copy link
Contributor

shramee commented Dec 22, 2022

From tsconfig#typeRoots,

By default all visible ”@types” packages are included in your compilation. Packages in node_modules/@types of any enclosing folder are considered visible. For example, that means packages within ./node_modules/@types/, ../node_modules/@types/, ../../node_modules/@types/, and so on.

This means for developers developing from somewhere inside their home dir, globally installed @types interfere and conflict with the types in starknet-hardhat-plugin directory. Resulting in errors like these,

../../.. Points to my home dir.

../../../node_modules/@types/eslint/helpers.d.ts:1:6 - error TS2300: Duplicate identifier 'Prepend'.
'Prepend' was also declared in node_modules/@types/eslint/helpers.d.ts:1:6

image

shramee added a commit to shramee/starknet-hardhat-plugin that referenced this issue Dec 22, 2022
@FabijanC FabijanC added OnlyDust Open for OnlyDust contributors bug Something isn't working labels Dec 23, 2022
FabijanC pushed a commit that referenced this issue Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OnlyDust Open for OnlyDust contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants