SoundCloudMobx
SoundCloudMobx copied to clipboard
报错了
Failed to compile.
Error in ./src/components/SearchPanel/SearchPanel.tsx (58,11): error TS2322: Type 'Readonly<{ children?: ReactNode; }> & Readonly<Props> & { additionalStyles: { text: { transition:...' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<Props & { additionalStyles: any; }, Stat...'. Type 'Readonly<{ children?: ReactNode; }> & Readonly<Props> & { additionalStyles: { text: { transition:...' is not assignable to type 'Readonly<Props & { additionalStyles: any; }>'.
抱歉, 这段时间比较忙,没有注意到. 你能提供详细一点的信息吗? 比如是在什么场景下?
cnpm install 是ok的 start报错 是代码错误
Error in ./src/components/SearchPanel/SearchPanel.tsx (58,11): error TS2322: Type 'Readonly<{ children?: ReactNode; }> & Readonly<Props> & { additionalStyles: { text: { transition:...' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<Props & { additionalStyles: any; }, Stat...'. Type 'Readonly<{ children?: ReactNode; }> & Readonly<Props> & { additionalStyles: { text: { transition:...' is not assignable to type 'Readonly<Props & { additionalStyles: any; }>'.
Error in ./src/components/Player/Player.tsx
(187,39): error TS2322: Type '{ onClick: () => void; children: (string | Element)[]; }' is not assignable to type 'IntrinsicAttributes & IButtonInlineProp'.
Type '{ onClick: () => void; children: (string | Element)[]; }' is not assignable to type 'IButtonInlineProp'.
Types of property 'children' are incompatible.
Type '(string | Element)[]' is not assignable to type 'ReactElement
Error in ./src/components/Player/Player.tsx
(193,39): error TS2322: Type '{ onClick: () => void; children: (string | Element)[]; }' is not assignable to type 'IntrinsicAttributes & IButtonInlineProp'.
Type '{ onClick: () => void; children: (string | Element)[]; }' is not assignable to type 'IButtonInlineProp'.
Types of property 'children' are incompatible.
Type '(string | Element)[]' is not assignable to type 'ReactElement
Error in ./src/components/Operators/Operators.tsx
(51,13): error TS2322: Type '{ style: {}; onClick: () => void; children: Element[]; }' is not assignable to type 'IntrinsicAttributes & IButtonInlineProp'.
Type '{ style: {}; onClick: () => void; children: Element[]; }' is not assignable to type 'IButtonInlineProp'.
Types of property 'children' are incompatible.
Type 'Element[]' is not assignable to type 'ReactElement
Error in ./src/components/Operators/Operators.tsx
(57,9): error TS2322: Type '{ children: Element[]; }' is not assignable to type 'IntrinsicAttributes & IButtonInlineProp'.
Type '{ children: Element[]; }' is not assignable to type 'IButtonInlineProp'.
Types of property 'children' are incompatible.
Type 'Element[]' is not assignable to type 'ReactElement
Error in ./src/components/Operators/Operators.tsx
(65,13): error TS2322: Type '{ children: Element[]; }' is not assignable to type 'IntrinsicAttributes & IButtonInlineProp'.
Type '{ children: Element[]; }' is not assignable to type 'IButtonInlineProp'.
Types of property 'children' are incompatible.
Type 'Element[]' is not assignable to type 'ReactElement
Error in ./src/components/MiniUser/MiniUser.tsx
(40,22): error TS2322: Type '{ onClick: () => void; children: "unfollow" | "follow"; }' is not assignable to type 'IntrinsicAttributes & IButtonGhostProps'.
Type '{ onClick: () => void; children: "unfollow" | "follow"; }' is not assignable to type 'IButtonGhostProps'.
Types of property 'children' are incompatible.
Type '"unfollow" | "follow"' is not assignable to type 'ReactElement
Error in ./src/components/LoadingSpinner/LoadingSpinner.tsx
(24,11): error TS2322: Type '{ onClick: () => void; children: string; }' is not assignable to type 'IntrinsicAttributes & IButtonInlineProp'.
Type '{ onClick: () => void; children: string; }' is not assignable to type 'IButtonInlineProp'.
Types of property 'children' are incompatible.
Type 'string' is not assignable to type 'ReactElement
Error in ./src/components/HoverActions/HoverActions.tsx
(25,9): error TS2322: Type '{ onClick: (() => void) | undefined; children: (string | number | Element | ReactElement
Error in ./src/components/Header/AuthImage.tsx
(53,35): error TS2322: Type '{ onClick: () => void; children: "Sign into SoundCloud" | "Sign out"; }' is not assignable to type 'IntrinsicAttributes & IButtonInlineProp'.
Type '{ onClick: () => void; children: "Sign into SoundCloud" | "Sign out"; }' is not assignable to type 'IButtonInlineProp'.
Types of property 'children' are incompatible.
Type '"Sign into SoundCloud" | "Sign out"' is not assignable to type 'ReactElement
Error in ./src/components/Community/BigUserIcon.tsx
(54,13): error TS2322: Type '{ onClick: (id: number) => void; children: "UNFOLLOW" | "FOLLOW"; }' is not assignable to type 'IntrinsicAttributes & IButtonGhostProps'.
Type '{ onClick: (id: number) => void; children: "UNFOLLOW" | "FOLLOW"; }' is not assignable to type 'IButtonGhostProps'.
Types of property 'children' are incompatible.
Type '"UNFOLLOW" | "FOLLOW"' is not assignable to type 'ReactElement
Error in ./src/components/ButtonMore/ButtonMore.tsx
(20,34): error TS2322: Type '{ isLoading: boolean; isHidden?: boolean | undefined; onClick: (...args: any[]) => void; isSmall?...' is not assignable to type 'IntrinsicAttributes & IButtonGhostProps'.
Type '{ isLoading: boolean; isHidden?: boolean | undefined; onClick: (...args: any[]) => void; isSmall?...' is not assignable to type 'IButtonGhostProps'.
Types of property 'children' are incompatible.
Type 'string' is not assignable to type 'ReactElement
Error in ./src/components/Callback.tsx (3,22): error TS2415: Class 'Callback' incorrectly extends base class 'Component<any, any>'. Property 'componentDidMount' is protected in type 'Callback' but public in type 'Component<any, any>'.
有两个警告 The key "user-scalabel" is not recognized and ignored. bundle.js:19495 Warning: Accessing PropTypes via the main React package is deprecated, and will be removed in React v16.0. Use the latest available v15.* prop-types package from npm instead. For info on usage, compatibility, migration and more, see https://fb.me/prop-types-docs
@xgzl87 谢谢你的回复. 从 log 看起来应该是代码的版本问题, 你可以试试拉取最新的code, 如果还不可以的话, 还烦请告知一下我 . 提示警告的话, 应该是有第三方使用的还是 15.6 以前的 react 包造成的 , 我会去跟踪一下依赖的包是否有更新.
还是报同样的错
编译好像是过了 浏览器一直在加载 加载一会儿就报错
我觉得是后台请求的问题,页面开始可以出来,一闪而过就报错了,这个是请求监控
这样看不出来, 一闪而过 是什么导致的呢?
跑不起来啊