【问题标题】:Problem with creation a new react-typescript app with 'npx create-react-app my-app --template typescript'使用“npx create-react-app my-app --template typescript”创建新的 react-typescript 应用程序的问题
【发布时间】:2021-03-27 01:17:17
【问题描述】:

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

我再次尝试使用yarn yarn create-react-app my-app --template typescript,但错误相同。

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

【问题讨论】:

    标签: reactjs typescript create-react-app yarnpkg npx


    【解决方案1】:

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

    【讨论】:

    • 你也可以用--use-npmnpm去
    猜你喜欢
    • 1970-01-01
    • 2021-03-03
    • 2022-10-20
    • 2021-11-27
    • 2022-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-16
    相关资源
    最近更新 更多