使用 'npx create-react-app my-app --template typescript' 创建新的 react-typescript 应用程序时出现问题

Problem with creation a new react-typescript app with 'npx create-react-app my-app --template typescript'

当我尝试创建一个新的 typescript react 应用程序时,出现错误。我 运行 npx create-react-app my-app --template typescript 导致此错误 Error: Cannot find module './copy-sync'

我再次尝试 yarnyarn create-react-app my-app --template typescript,但错误还是一样。

我知道不再支持 create-react-app 全局安装 ,所以我在本地安装了它。

通过将 yarn 从版本 1.17.3 更新到 1.22.5,该问题已解决。