Type conflict using preact@^10.5.7 + preact-i18n@2.3.0-preactx + @types/preact-i18n@^1.2.0
See original GitHub issuethe compilation works, and the page is displayed, but in the console there are tons of errors, such as:
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/preact-i18n/node_modules/preact/dist/preact.d.ts(942,13):
TS2320: Interface 'Element' cannot simultaneously extend types 'VNode<any>' and 'ReactElement<any, any>'.
Named property 'key' of types 'VNode<any>' and 'ReactElement<any, any>' are not identical.
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/preact-i18n/node_modules/preact/dist/preact.d.ts(945,13):
TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, any>' and 'Component<any, {}, any>'.
Named property 'componentDidUpdate' of types 'Component<any, any>' and 'Component<any, {}, any>' are not identical.
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/preact-i18n/node_modules/preact/dist/preact.d.ts(945,13):
TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, any>' and 'Component<any, {}, any>'.
Named property 'componentWillUpdate' of types 'Component<any, any>' and 'Component<any, {}, any>' are not identical.
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/preact-i18n/node_modules/preact/dist/preact.d.ts(945,13):
TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, any>' and 'Component<any, {}, any>'.
Named property 'props' of types 'Component<any, any>' and 'Component<any, {}, any>' are not identical.
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/preact-i18n/node_modules/preact/dist/preact.d.ts(945,13):
TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, any>' and 'Component<any, {}, any>'.
Named property 'setState' of types 'Component<any, any>' and 'Component<any, {}, any>' are not identical.
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/preact-i18n/node_modules/preact/dist/preact.d.ts(945,13):
TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, any>' and 'Component<any, {}, any>'.
Named property 'shouldComponentUpdate' of types 'Component<any, any>' and 'Component<any, {}, any>' are not identical.
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/preact-i18n/node_modules/preact/dist/preact.d.ts(945,13):
TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, any>' and 'Component<any, {}, any>'.
Named property 'state' of types 'Component<any, any>' and 'Component<any, {}, any>' are not identical.
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/preact-i18n/node_modules/preact/dist/preact.d.ts(956,8):
TS2300: Duplicate identifier 'LibraryManagedAttributes'.
·
·
·
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/react/index.d.ts(3164,13):
TS2717: Subsequent property declarations must have the same type. Property 'symbol' must be of type 'SVGAttributes', but here has type 'SVGProps<SVGSymbolElement>'.
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/react/index.d.ts(3165,13):
TS2717: Subsequent property declarations must have the same type. Property 'text' must be of type 'SVGAttributes', but here has type 'SVGProps<SVGTextElement>'.
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/react/index.d.ts(3167,13):
TS2717: Subsequent property declarations must have the same type. Property 'tspan' must be of type 'SVGAttributes', but here has type 'SVGProps<SVGTSpanElement>'.
ERROR in /home/user/Projects/drackp2m/esp3d-ui/node_modules/@types/react/index.d.ts(3168,13):
TS2717: Subsequent property declarations must have the same type. Property 'use' must be of type 'SVGAttributes', but here has type 'SVGProps<SVGUseElement>'.
When I remove the type package, the compilation does not fail, but the imports are not done automatically.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Finally the pull request of @saschazar21 are merged and the issue has been fixed!
❤️
Unfortunately I don’t have much time to review all that, I finally hid the errors by adding
skipLibCheck => true
in thecompilerOptions
section of mytsconfig.json
file.Although the bookstore itself works great. Nice job!!