gsj987 / Typescript-mobx-antd-admin

A implementation of antd-admin with typescript and mobx
10 stars 2 forks source link

报错 #1

Open picnic-yu opened 6 years ago

picnic-yu commented 6 years ago

[HMR] Waiting for update signal from WDS... :9090/#/login?from=/:1 The SSL certificate used to load resources from https://t.alipayobjects.com will be distrusted in M70. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information. :9090/#/login?from=/:1 Failed to load http://localhost:9090/api/v1/userInfo: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:9090' is therefore not allowed access. client?92b1:77 [WDS] Hot Module Replacement enabled. client?92b1:161 [WDS] Errors while compiling. Reload prevented. errors @ client?92b1:161 client?92b1:167 [at-loader] ./nodemodules/@types_react@15.0.24@@types/react/index.d.ts:181:11 TS2559: Type 'Component<P, S>' has no properties in common with type 'ComponentLifecycle<P, S>'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Editor/Editor.tsx:3:20 TS2307: Cannot find module './Editor.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Layout/Bread.tsx:4:20 TS2307: Cannot find module './Bread.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Layout/Bread.tsx:45:13 TS2605: JSX element type 'Component<LinkProps, ComponentState>' is not a constructor function for JSX elements. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Layout/Bread.tsx:57:11 TS2605: JSX element type 'Component<LinkProps, ComponentState>' is not a constructor function for JSX elements. Types of property 'state' are incompatible. Type 'void | Readonly<{}>' is not assignable to type 'Readonly'. Type 'void' is not assignable to type 'Readonly'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Layout/Footer.tsx:2:20 TS2307: Cannot find module './Footer.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Layout/Header.tsx:3:20 TS2307: Cannot find module './Header.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Layout/Menu.tsx:19:9 TS2605: JSX element type 'Component<LinkProps, ComponentState>' is not a constructor function for JSX elements. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Layout/Sider.tsx:3:20 TS2307: Cannot find module './Layout.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Layout/index.ts:6:20 TS2307: Cannot find module './Layout.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Search/Search.tsx:3:20 TS2307: Cannot find module './Search.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Search/Search.tsx:68:62 TS2605: JSX element type 'Component<OptionProps, ComponentState>' is not a constructor function for JSX elements. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/Search/Search.tsx:68:62 TS2605: JSX element type 'Component<OptionProps, ComponentState>' is not a constructor function for JSX elements. Types of property 'state' are incompatible. Type 'void | Readonly<{}>' is not assignable to type 'Readonly'. Type 'void' is not assignable to type 'Readonly'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/components/layer/layer.tsx:5:20 TS2307: Cannot find module './layer.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/index.tsx:6:17 TS2605: JSX element type 'APP' is not a constructor function for JSX elements. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/index.tsx:6:17 TS2605: JSX element type 'APP' is not a constructor function for JSX elements. Types of property 'state' are incompatible. Type 'void' is not assignable to type 'Readonly'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/router.tsx:132:10 TS2605: JSX element type 'Component<RouterProps, ComponentState>' is not a constructor function for JSX elements. Types of property 'state' are incompatible. Type 'void | Readonly<{}>' is not assignable to type 'Readonly'. Type 'void' is not assignable to type 'Readonly'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/routes/UIElement/dataTable/index.tsx:109:15 TS2605: JSX element type 'Component<OptionProps, ComponentState>' is not a constructor function for JSX elements. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/routes/UIElement/dataTable/index.tsx:110:15 TS2605: JSX element type 'Component<OptionProps, ComponentState>' is not a constructor function for JSX elements. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/routes/UIElement/iconfont/index.tsx:4:20 TS2307: Cannot find module './index.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/routes/chart/Container.tsx:2:20 TS2307: Cannot find module './Container.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/routes/dashboard/components/browser.tsx:3:20 TS2307: Cannot find module './browser.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/routes/dashboard/components/comments.tsx:3:20 TS2307: Cannot find module './comments.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/routes/dashboard/components/completed.tsx:2:20 TS2307: Cannot find module './completed.less'. errors @ client?92b1:167 client?92b1:167 [at-loader] ./src/routes/dashboard/components/cpu.tsx:2:20

gsj987 commented 6 years ago

请问你使用的ts版本是多少,npm的版本是多少?

yueyunyue commented 6 years ago

一样报错,npm6.4.1 ts3.1.1

AltRoot17 commented 4 years ago

Same issue , any solution?