microsoft / TypeScript-React-Native-Starter

A starter template for TypeScript and React Native with a detailed README describing how to use the two together.
MIT License
1.91k stars 211 forks source link

Hello.tsx does not compile via MSBUILD using TypeScript 2.2 or 2.3 #3

Open nmyhre opened 7 years ago

nmyhre commented 7 years ago

Compiling Hello.tsx, or any other React Native TypeScript code, I get the same JSX errors below despite using React in the csproj options. I have copy and pasted the csproj options I am using as well. Known? Thanks.

Severity    Code    Description Project File    Line    Suppression State
Error   TS2604  JSX element type 'View' does not have any construct or call signatures. ReactTestApp, TestApp.React (tsconfig project)  C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 21  Active
Error   TS2604  JSX element type 'Text' does not have any construct or call signatures. ReactTestApp, TestApp.React (tsconfig project)  C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 22  Active
Error   TS2604  JSX element type 'View' does not have any construct or call signatures. ReactTestApp, TestApp.React (tsconfig project)  C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 25  Active
Error   TS2604  JSX element type 'View' does not have any construct or call signatures. ReactTestApp, TestApp.React (tsconfig project)  C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 26  Active
Error   TS2604  JSX element type 'Button' does not have any construct or call signatures.   ReactTestApp, TestApp.React (tsconfig project)  C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 27  Active
Error   TS2604  JSX element type 'View' does not have any construct or call signatures. ReactTestApp, TestApp.React (tsconfig project)  C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 29  Active
Error   TS2604  JSX element type 'Button' does not have any construct or call signatures.   ReactTestApp, TestApp.React (tsconfig project)  C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 30  Active
Error   TS17004 Cannot use JSX unless the '--jsx' flag is provided. TestApp.React (tsconfig project)    C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 21  Active
Error   TS17004 Cannot use JSX unless the '--jsx' flag is provided. TestApp.React (tsconfig project)    C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 22  Active
Error   TS17004 Cannot use JSX unless the '--jsx' flag is provided. TestApp.React (tsconfig project)    C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 25  Active
Error   TS17004 Cannot use JSX unless the '--jsx' flag is provided. TestApp.React (tsconfig project)    C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 26  Active
Error   TS17004 Cannot use JSX unless the '--jsx' flag is provided. TestApp.React (tsconfig project)    C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 27  Active
Error   TS17004 Cannot use JSX unless the '--jsx' flag is provided. TestApp.React (tsconfig project)    C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 29  Active
Error   TS17004 Cannot use JSX unless the '--jsx' flag is provided. TestApp.React (tsconfig project)    C:\Users\nmyhre\Source\Repos\TestApp.React\windows\ReactTestApp\TypeScriptSrc\Hello.tsx 30  Active

  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
    <TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
    <TypeScriptTarget>ES6</TypeScriptTarget>
    <TypeScriptJSXEmit>React</TypeScriptJSXEmit>
    <TypeScriptNoImplicitAny>True</TypeScriptNoImplicitAny>
    <TypeScriptModuleKind>ES6</TypeScriptModuleKind>
    <TypeScriptRemoveComments>False</TypeScriptRemoveComments>
    <TypeScriptOutFile />
    <TypeScriptOutDir>C:\Users\nmyhre\Source\Repos\TestApp.React\build</TypeScriptOutDir>
    <TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
    <TypeScriptNoEmitOnError>False</TypeScriptNoEmitOnError>
    <TypeScriptSourceMap>True</TypeScriptSourceMap>
    <TypeScriptMapRoot />
    <TypeScriptSourceRoot />
    <TypeScriptAllowSyntheticDefaultImports>True</TypeScriptAllowSyntheticDefaultImports>
    <TypeScriptAlwaysStrict>True</TypeScriptAlwaysStrict>
  </PropertyGroup>