amis 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>'.

wlzqhblo  于 3个月前  发布在  其他
关注(0)|答案(4)|浏览(69)

用新版本得amis-editor yarn dev得时候报这个错误,帮忙看看什么原因导致的?
TS2345: Argument of type 'typeof SchemaRenderer' is not assignable to parameter of type 'ComponentType'.
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'.

2skhul33

2skhul331#

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

wqsoz72f

wqsoz72f2#

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

aoyhnmkz

aoyhnmkz3#

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

5us2dqdw

5us2dqdw4#

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

相关问题