Skip to content

Unable to create react app with typescript #13767

@underager

Description

@underager

Hi,
So I have been trying to create a react app with the following command
"npx create-react-app my-app --template typescript"

         However, upon running the command I am getting the following set of errors

         Installing template dependencies using npm...
          npm ERR! code ERESOLVE
          npm ERR! ERESOLVE unable to resolve dependency tree
          npm ERR!
          npm ERR! While resolving: box-retail@0.1.0
          npm ERR! Found: react@19.0.0
          npm ERR! node_modules/react
          npm ERR!   react@"^19.0.0" from the root project
          npm ERR!
          npm ERR! Could not resolve dependency:
          npm ERR! peer react@"^18.0.0" from @testing-library/react@13.4.0
          npm ERR! node_modules/@testing-library/react
          npm ERR!   @testing-library/react@"^13.0.0" from the root project
          npm ERR!
          npm ERR! Fix the upstream dependency conflict, or retry
          npm ERR! this command with --force or --legacy-peer-deps
          npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
          npm ERR!

         Could you please suggest on how to move ahead from here.

Thanks

Metadata

Metadata

Assignees

No one assigned

    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