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

Generated example publishing to the server - typescript errors #1120

Description

@Tranzystor

I've generated asp sample by:

yo aspnetcore-spa

During generation I have chosen react with redux option.

Example works locally fine but now I'd like to publish it to my production server.
To do it I used Publish function from context menu in Microsoft Visual Studio but during building I got an error like that:

command "node node_modules/webpack/bin/webpack.js --env.prod was exited by code 2

I tried to execute this command in Developer Command Promt for VS 2017 and i got errors:

  1. ERROR in [at-loader] ./ClientApp/routes.tsx:9:12
     TS2322: Type '{ exact: true; path: "/"; component: typeof Home; }' is no
     t assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route<T>> &
     Readonly<{ children?: ReactNode; }> & ...'.
     Type '{ exact: true; path: "/"; component: typeof Home; }' is not assignab
     le to type 'Readonly<T>'.
    
  2. ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:67:21
     TS2694: Namespace 'React' has no exported member 'ComponentType'.
    

Visual Studio version is: Microsoft Visual Studio Enterprise 2017 version 15.2.

TypeScript version is 2.2.3.

I'm really new with TS and .net core apps. Is there any possibility to fix these errors?
Project which I want to publish is pure example generated by JavaScriptServices. I didn't add any changes.

The same problem occured when I generated React redux example in Developer Command Prompt for VS 2017.

Thanks for help in advance!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions