Skip to content

Typescript: Simplified typescript steps not working #5541

Closed
@sebasmurphy

Description

@sebasmurphy

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

Environment

Environment:
OS: macOS 10.14
Node: 10.12.0
Yarn: 1.10.1
npm: 6.4.1

Packages: (wanted => installed)
react: ^16.5.2 => 16.5.2
react-dom: ^16.5.2 => 16.5.2
react-scripts: 2.0.5 => 2.0.5

Steps to Reproduce

I noticed that typescript was added to the project officially. I went ahead and created a new project and followed in the instructions detailed in 3c11efe but they did not work. I've walked back through the commit history and tried some of the previously detailed steps to no avail. Neither creating a tsconfig.json or a tsconfig.json with {} in the file worked for me either.

Followed instructions listed at https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/adding-typescript.md

  1. npx create-react-app
  2. yarn add typescript @types/react @types/react-dom @types/jest
  3. Rename src/index.js to src/index.tsx

Expected Behavior

I expected the app to start correctly

Actual Behavior

Received an error .

Could not find a required file.
  Name: index.js

Reproducible Demo

https://github.com/sebasmurphy/prototype-react-typescript

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