Yeoman generator: issues with NPM package versions #566

Closed
opened 2025-08-09 17:16:47 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @jzbyers on 7/19/2017

I have run into this problem a few times, and I've found that I've had to install more recent versions of some packages, namely Typescript.

The issue occurs when running yo aspnetcore-spa, and the error messages are as follows:

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:67:21 
    TS2694: Namespace 'React' has no exported member 'ComponentType'.

ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:102:48 
    TS2694: Namespace 'React' has no exported member 'ComponentType'.
*Originally created by @jzbyers on 7/19/2017* I have run into this problem a few times, and I've found that I've had to install more recent versions of some packages, namely Typescript. The issue occurs when running `yo aspnetcore-spa`, and the error messages are as follows: 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:67:21 TS2694: Namespace 'React' has no exported member 'ComponentType'. ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:102:48 TS2694: Namespace 'React' has no exported member 'ComponentType'.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#566
No description provided.