执行 tsc -p tsconfig.build.json之后一直报错

新手上路,请多包涵

最近再写一个 React + Ts 的项目,打包的时候就一直报这个错为什么啊
node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3084:13 - error TS2717: Subsequent property declarations must have the same type. Property 'title' must be of type 'DetailedHTMLProps<HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>'.

3084 title: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>;


  node_modules/@types/react/index.d.ts:3098:13
    3098             title: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>;
'title' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3085:13 - error TS2717: Subsequent property declarations must have the same type. Property 'tr' must be of type 'DetailedHTMLProps<HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>'.

3085 tr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>;

             ~~

node_modules/@types/react/index.d.ts:3099:13

3099             tr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>;
                 ~~
'tr' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3086:13 - error TS2717: Subsequent property declarations must have the same type. Property 'track' must be of type 'DetailedHTMLProps<TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>', but here has type 'DetailedHTMLProps<TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>'.

3086 track: React.DetailedHTMLProps<React.TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>;


  node_modules/@types/react/index.d.ts:3100:13
    3100             track: React.DetailedHTMLProps<React.TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>;
'track' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3087:13 - error TS2717: Subsequent property declarations must have the same type. Property 'u' must be of type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>'.

3087 u: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;

             ~

node_modules/@types/react/index.d.ts:3101:13

3101             u: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
                 ~
'u' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3088:13 - error TS2717: Subsequent property declarations must have the same type. Property 'ul' must be of type 'DetailedHTMLProps<HTMLAttributes<HTMLUListElement>, HTMLUListElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLUListElement>, HTMLUListElement>'.

3088 ul: React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>;

             ~~

node_modules/@types/react/index.d.ts:3102:13

3102             ul: React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
                 ~~
'ul' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3089:13 - error TS2717: Subsequent property declarations must have the same type. Property '"var"' must be of type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>'.

3089 "var": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;


  node_modules/@types/react/index.d.ts:3103:13
    3103             "var": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
'"var"' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3090:13 - error TS2717: Subsequent property declarations must have the same type. Property 'video' must be of type 'DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>', but here has type 'DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>'.

3090 video: React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;


  node_modules/@types/react/index.d.ts:3104:13
    3104             video: React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
'video' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3091:13 - error TS2717: Subsequent property declarations must have the same type. Property 'wbr' must be of type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>'.

3091 wbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;


  node_modules/@types/react/index.d.ts:3105:13
    3105             wbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
'wbr' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3092:13 - error TS2717: Subsequent property declarations must have the same type. Property 'webview' must be of type 'DetailedHTMLProps<WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>', but here has type 'DetailedHTMLProps<WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>'.

3092 webview: React.DetailedHTMLProps<React.WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;


  node_modules/@types/react/index.d.ts:3106:13
    3106             webview: React.DetailedHTMLProps<React.WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
'webview' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3095:13 - error TS2717: Subsequent property declarations must have the same type. Property 'svg' must be of type 'SVGProps<SVGSVGElement>', but here has type 'SVGProps<SVGSVGElement>'.

3095 svg: React.SVGProps<SVGSVGElement>;


  node_modules/@types/react/index.d.ts:3109:13
    3109             svg: React.SVGProps<SVGSVGElement>;
'svg' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3097:13 - error TS2717: Subsequent property declarations must have the same type. Property 'animate' must be of type 'SVGProps<SVGElement>', but here has type 'SVGProps<SVGElement>'.

3097 animate: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateElement but is not in TypeScript's lib.dom.d.ts for now.


  node_modules/@types/react/index.d.ts:3111:13
    3111             animate: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateElement but is not in TypeScript's lib.dom.d.ts for now.
'animate' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3098:13 - error TS2717: Subsequent property declarations must have the same type. Property 'animateMotion' must be of type 'SVGProps<SVGElement>', but here has type 'SVGProps<SVGElement>'.

3098 animateMotion: React.SVGProps<SVGElement>;


  node_modules/@types/react/index.d.ts:3112:13
    3112             animateMotion: React.SVGProps<SVGElement>;
'animateMotion' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3099:13 - error TS2717: Subsequent property declarations must have the same type. Property 'animateTransform' must be of type 'SVGProps<SVGElement>', but here has type 'SVGProps<SVGElement>'.

3099 animateTransform: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateTransformElement but is not in TypeScript's lib.dom.d.ts for now.


  node_modules/@types/react/index.d.ts:3113:13
    3113             animateTransform: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateTransformElement but is not in TypeScript's lib.dom.d.ts for now.
'animateTransform' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3100:13 - error TS2717: Subsequent property declarations must have the same type. Property 'circle' must be of type 'SVGProps<SVGCircleElement>', but here has type 'SVGProps<SVGCircleElement>'.

3100 circle: React.SVGProps<SVGCircleElement>;


  node_modules/@types/react/index.d.ts:3114:13
    3114             circle: React.SVGProps<SVGCircleElement>;
'circle' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3101:13 - error TS2717: Subsequent property declarations must have the same type. Property 'clipPath' must be of type 'SVGProps<SVGClipPathElement>', but here has type 'SVGProps<SVGClipPathElement>'.

3101 clipPath: React.SVGProps<SVGClipPathElement>;


  node_modules/@types/react/index.d.ts:3115:13
    3115             clipPath: React.SVGProps<SVGClipPathElement>;
'clipPath' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3102:13 - error TS2717: Subsequent property declarations must have the same type. Property 'defs' must be of type 'SVGProps<SVGDefsElement>', but here has type 'SVGProps<SVGDefsElement>'.

3102 defs: React.SVGProps<SVGDefsElement>;


  node_modules/@types/react/index.d.ts:3116:13
    3116             defs: React.SVGProps<SVGDefsElement>;
'defs' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3103:13 - error TS2717: Subsequent property declarations must have the same type. Property 'desc' must be of type 'SVGProps<SVGDescElement>', but here has type 'SVGProps<SVGDescElement>'.

3103 desc: React.SVGProps<SVGDescElement>;


  node_modules/@types/react/index.d.ts:3117:13
    3117             desc: React.SVGProps<SVGDescElement>;
'desc' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3104:13 - error TS2717: Subsequent property declarations must have the same type. Property 'ellipse' must be of type 'SVGProps<SVGEllipseElement>', but here has type 'SVGProps<SVGEllipseElement>'.

3104 ellipse: React.SVGProps<SVGEllipseElement>;


  node_modules/@types/react/index.d.ts:3118:13
    3118             ellipse: React.SVGProps<SVGEllipseElement>;
'ellipse' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3105:13 - error TS2717: Subsequent property declarations must have the same type. Property 'feBlend' must be of type 'SVGProps<SVGFEBlendElement>', but here has type 'SVGProps<SVGFEBlendElement>'.

3105 feBlend: React.SVGProps<SVGFEBlendElement>;


  node_modules/@types/react/index.d.ts:3119:13
    3119             feBlend: React.SVGProps<SVGFEBlendElement>;
'feBlend' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3106:13 - error TS2717: Subsequent property declarations must have the same type. Property 'feColorMatrix' must be of type 'SVGProps<SVGFEColorMatrixElement>', but here has type 'SVGProps<SVGFEColorMatrixElement>'.

3106 feColorMatrix: React.SVGProps<SVGFEColorMatrixElement>;


  node_modules/@types/react/index.d.ts:3120:13
    3120             feColorMatrix: React.SVGProps<SVGFEColorMatrixElement>;
'feColorMatrix' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3107:13 - error TS2717: Subsequent property declarations must have the same type. Property 'feComponentTransfer' must be of type 'SVGProps<SVGFEComponentTransferElement>', but here has type 'SVGProps<SVGFEComponentTransferElement>'.

3107 feComponentTransfer: React.SVGProps<SVGFEComponentTransferElement>;


  node_modules/@types/react/index.d.ts:3121:13
    3121             feComponentTransfer: React.SVGProps<SVGFEComponentTransferElement>;
'feComponentTransfer' was also declared here.

node_modules/@types/testing-library__react/node_modules/@types/react/index.d.ts:3108:13 - error TS2717: Subsequent property declarations must have the same type. Property 'feComposite' must be of type 'SVGProps<SVGFECompositeElement>', but here has type 'SVGProps<SVGFECompositeElement>'.

3108 feComposite: React.SVGProps<SVGFECompositeElement>;


  node_modules/@types/react/index.d.ts:3122:13
    3122             feComposite: React.SVGProps<SVGFECompositeElement>;
'feComposite' was also declared here.
阅读 2.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题