Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Fresh installation if react + redux project builds with 5 errors #1216

Closed
andrei-galkin opened this issue Aug 22, 2017 · 3 comments
Closed

Comments

@andrei-galkin
Copy link

I just did fresh install of react + redux project and it compiles with 5 errors which are below.

Checking finished with 5 errors
Hash: 08f575dd6f1e8269fbfde6a114b21af4daf8a817
Version: webpack 2.5.1
Child
Hash: 08f575dd6f1e8269fbfd
Time: 3716ms
Asset Size Chunks Chunk Names
main-client.js 30.7 kB 0 [emitted] main-client
site.css 1.56 kB 0 [emitted] main-client
main-client.js.map 40.9 kB 0 [emitted] main-client
site.css.map 85 bytes 0 [emitted] main-client

ERROR in [at-loader] ./ClientApp/routes.tsx:9:12
    TS2322: Type '{ exact: true; path: "/"; component: typeof Home; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
  Type '{ exact: true; path: "/"; component: typeof Home; }' is not assignable to type 'Readonly<T>'.

ERROR in [at-loader] ./ClientApp/routes.tsx:10:12
    TS2322: Type '{ path: "/counter"; component: typeof Counter; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
  Type '{ path: "/counter"; component: typeof Counter; }' is not assignable to type 'Readonly<T>'.

ERROR in [at-loader] ./ClientApp/routes.tsx:11:12
    TS2322: Type '{ path: "/fetchdata/:startDateIndex?"; component: typeof FetchData; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
  Type '{ path: "/fetchdata/:startDateIndex?"; component: typeof FetchData; }' is not assignable to type 'Readonly<T>'.

ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:68:21
    TS2694: Namespace 'React' has no exported member 'ComponentType'.

ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:103:48
    TS2694: Namespace 'React' has no exported member 'ComponentType'.

Child
Hash: e6a114b21af4daf8a817
Time: 3427ms
Asset Size Chunks Chunk Names
main-server.js 77.3 kB 0 [emitted] main-server

ERROR in [at-loader] ./ClientApp/routes.tsx:9:12
    TS2322: Type '{ exact: true; path: "/"; component: typeof Home; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
  Type '{ exact: true; path: "/"; component: typeof Home; }' is not assignable to type 'Readonly<T>'.

ERROR in [at-loader] ./ClientApp/routes.tsx:10:12
    TS2322: Type '{ path: "/counter"; component: typeof Counter; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
  Type '{ path: "/counter"; component: typeof Counter; }' is not assignable to type 'Readonly<T>'.

ERROR in [at-loader] ./ClientApp/routes.tsx:11:12
    TS2322: Type '{ path: "/fetchdata/:startDateIndex?"; component: typeof FetchData; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
  Type '{ path: "/fetchdata/:startDateIndex?"; component: typeof FetchData; }' is not assignable to type 'Readonly<T>'.

ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:68:21
    TS2694: Namespace 'React' has no exported member 'ComponentType'.

ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:103:48
    TS2694: Namespace 'React' has no exported member 'ComponentType'.

Thanks for the support.

@J0hnRoger
Copy link

Same problem after generate the project from the yeoman template :

I have installed the .Net Core 1.0.5 with the SDK 1.0.4 (latest version in 1.0*)
My version of TS : 2.1.5

[at-loader] Checking finished with 5 errors

[at-loader] Checking finished with 5 errors
Hash: 08f575dd6f1e8269fbfde6a114b21af4daf8a817
Version: webpack 2.5.1
Child
    Hash: 08f575dd6f1e8269fbfd
    Time: 2966ms
                 Asset      Size  Chunks             Chunk Names
        main-client.js   30.7 kB       0  [emitted]  main-client
              site.css   1.56 kB       0  [emitted]  main-client
    main-client.js.map   40.9 kB       0  [emitted]  main-client
          site.css.map  85 bytes       0  [emitted]  main-client

    ERROR in [at-loader] ./ClientApp/routes.tsx:9:12
        TS2322: Type '{ exact: true; path: "/"; component: typeof Home; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
      Type '{ exact: true; path: "/"; component: typeof Home; }' is not assignable to type 'Readonly<T>'.

    ERROR in [at-loader] ./ClientApp/routes.tsx:10:12
        TS2322: Type '{ path: "/counter"; component: typeof Counter; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
      Type '{ path: "/counter"; component: typeof Counter; }' is not assignable to type 'Readonly<T>'.

    ERROR in [at-loader] ./ClientApp/routes.tsx:11:12
        TS2322: Type '{ path: "/fetchdata/:startDateIndex?"; component: typeof FetchData; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
      Type '{ path: "/fetchdata/:startDateIndex?"; component: typeof FetchData; }' is not assignable to type 'Readonly<T>'.

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:68:21
        TS2694: Namespace 'React' has no exported member 'ComponentType'.

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:103:48
        TS2694: Namespace 'React' has no exported member 'ComponentType'.
Child
    Hash: e6a114b21af4daf8a817
    Time: 2686ms
             Asset     Size  Chunks             Chunk Names
    main-server.js  77.3 kB       0  [emitted]  main-server

    ERROR in [at-loader] ./ClientApp/routes.tsx:9:12
        TS2322: Type '{ exact: true; path: "/"; component: typeof Home; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
      Type '{ exact: true; path: "/"; component: typeof Home; }' is not assignable to type 'Readonly<T>'.

    ERROR in [at-loader] ./ClientApp/routes.tsx:10:12
        TS2322: Type '{ path: "/counter"; component: typeof Counter; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
      Type '{ path: "/counter"; component: typeof Counter; }' is not assignable to type 'Readonly<T>'.

    ERROR in [at-loader] ./ClientApp/routes.tsx:11:12
        TS2322: Type '{ path: "/fetchdata/:startDateIndex?"; component: typeof FetchData; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'.
      Type '{ path: "/fetchdata/:startDateIndex?"; component: typeof FetchData; }' is not assignable to type 'Readonly<T>'.

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:68:21
        TS2694: Namespace 'React' has no exported member 'ComponentType'.

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:103:48
        TS2694: Namespace 'React' has no exported member 'ComponentType'.

@J0hnRoger
Copy link

Find a solution here

Update @type and typescript in my package.json, and then run npm i work for me

@SteveSandersonMS
Copy link
Member

The Yeoman templates are out of date and will be marked as deprecated soon.

If you're starting a new project, please use the dotnet new templates! If you install .NET Core 2.0 SDK, it has current Angular/React/Redux templates built in (e.g., dotnet new redux).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants