Skip to content

clone 项目到本地后,npm run compile 报错 #11093

Description

@jamieYou
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.6.4

Environment

node - v10.0.0

Reproduction link

https://github.com/ant-design/ant-design

Steps to reproduce

  1. git clone git@github.com:ant-design/ant-design.git
  2. npm install
  3. npm run compile

What is expected?

完整打包出 es、lib 文件夹的内容

What is actually happening?

只有样式打包了,但是没有 js 文件。


antd-tools run compile
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
components/alert/index.tsx(38,10): error TS2540: Cannot assign to 'state' because it is a constant or a read-only property.
components/alert/index.tsx(100,32): error TS2531: Object is possibly 'null'.
components/alert/index.tsx(117,12): error TS2531: Object is possibly 'null'.
components/alert/index.tsx(124,25): error TS2531: Object is possibly 'null'.
components/anchor/Anchor.tsx(126,10): error TS2540: Cannot assign to 'state' because it is a constant or a read-only property.
components/anchor/Anchor.tsx(146,21): error TS2531: Object is possibly 'null'.
components/anchor/Anchor.tsx(244,13): error TS2459: Type 'Readonly<any> | null' has no property 'activeLink' and no string index signature.
components/avatar/index.tsx(37,10): error TS2540: Cannot assign to 'state' because it is a constant or a read-only property.
components/avatar/index.tsx(49,33): error TS2531: Object is possibly 'null'.
components/avatar/index.tsx(49,53): error TS2531: Object is possibly 'null'.
components/avatar/index.tsx(50,38): error TS2531: Object is possibly 'null'.
components/avatar/index.tsx(88,38): error TS2531: Object is possibly 'null'.
components/avatar/index.tsx(93,16): error TS2531: Object is possibly 'null'.
components/avatar/index.tsx(104,27): error TS2531: Object is possibly 'null'.
components/avatar/index.tsx(106,33): error TS2531: Object is possibly 'null'.
components/avatar/index.tsx(107,37): error TS2531: Object is possibly 'null'.
components/avatar/index.tsx(108,31): error TS2531: Object is possibly 'null'.
components/back-top/index.tsx(43,10): error TS2540: Cannot assign to 'state' because it is a constant or a read-only property.
components/back-top/index.tsx(122,24): error TS2531: Object is possibly 'null'.
components/badge/ScrollNumber.tsx(41,10): error TS2540: Cannot assign to 'state' because it is a constant or a read-only property.
components/badge/ScrollNumber.tsx(48,9): error TS2531: Object is possibly 'null'.
components/badge/ScrollNumber.tsx(51,41): error TS2531: Object is possibly 'null'.
components/badge/ScrollNumber.tsx(54,9): error TS2531: Object is possibly 'null'.
components/badge/ScrollNumber.tsx(68,11): error TS2531: Object is possibly 'null'.
components/badge/ScrollNumber.tsx(71,24): error TS2531: Object is possibly 'null'.
components/badge/ScrollNumber.tsx(104,30): error TS2531: Object is possibly 'null'.
components/badge/ScrollNumber.tsx(120,10): error TS2531: Object is possibly 'null'.
components/badge/ScrollNumber.tsx(120,31): error TS2531: Object is possibly 'null'.
components/badge/ScrollNumber.tsx(121,14): error TS2531: Object is possibly 'null'.
components/badge/ScrollNumber.tsx(123,27): error TS2531: Object is possibly 'null'.
components/button/button.tsx(91,10): error TS2540: Cannot assign to 'state' because it is a constant or a read-only property.
components/button/button.tsx(135,12): error TS2531: Object is possibly 'null'.
components/button/button.tsx(140,16): error TS2531: Object is possibly 'null'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions