amis icon indicating copy to clipboard operation
amis copied to clipboard

TS2345: Argument of type 'typeof SchemaRenderer' is not assignable to parameter of type 'ComponentType<SchemaRendererProps>'. Type 'typeof SchemaRenderer' is not assignable to type 'ComponentClass<SchemaRendererProps, any>'.

Open shudj opened this issue 1 year ago • 4 comments

用新版本得amis-editor yarn dev得时候报这个错误,帮忙看看什么原因导致的? TS2345: Argument of type 'typeof SchemaRenderer' is not assignable to parameter of type 'ComponentType<SchemaRendererProps>'. Type 'typeof SchemaRenderer' is not assignable to type 'ComponentClass<SchemaRendererProps, any>'. Types of property 'contextType' are incompatible. Type 'React.Context | undefined' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").Context | undefined'. Type 'React.Context' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").Context'. The types of 'Provider.propTypes' are incompatible between these types. Type 'React.WeakValidationMap<React.ProviderProps> | undefined' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").WeakValidationMap<import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").ProviderProps>...'. Type 'React.WeakValidationMap<React.ProviderProps>' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").WeakValidationMap<import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").ProviderProps>'. Types of property 'children' are incompatible. Type 'React.Validator<React.ReactNode> | undefined' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").Validator<import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").ReactNode> | undefined'. Type 'React.Validator<React.ReactNode>' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\prop-types\index").Validator<import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").ReactNode>'. Type 'React.ReactNode' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").ReactNode'. Type '{}' is not assignable to type 'ReactNode'.

shudj avatar Mar 19 '24 06:03 shudj

请问用的什么版本?有没有问题工程仓库

2betop avatar Mar 27 '24 03:03 2betop

6.0.0 同样出现这个问题,请问应该使用什么版本

linzhixiang avatar May 06 '24 05:05 linzhixiang

6.5.0 也遇到这个问题了 请问如何解决呢?

wangg9722 avatar Jun 20 '24 10:06 wangg9722

我找别人要了个旧版的lock文件,好像可以了。应该是typescript相关包的版本问题。

hejun200613224 avatar Aug 27 '24 01:08 hejun200613224