Skip to content

Adding TypeScript to existing project does not add tsconfig #10951

@mwisnicki

Description

@mwisnicki

Describe the bug

If you follow https://create-react-app.dev/docs/adding-typescript and attempt to add TypeScript to existing project using

npm install --save typescript @types/node @types/react @types/react-dom @types/jest

The resulting changes will obviously not include tsconfig, unlike newly created projects and contrary to next section of manual.

Environment

create-react-app: 4.0.3

Steps to reproduce

npx create-react-app my-app
cd my-app
npm install --save typescript @types/node @types/react @types/react-dom @types/jest
cat tsconfig.json

Expected behavior

Default tsconfig.json file is added to the project if you follow documentation.

Actual behavior

No tsconfig.json :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions