【问题标题】:npx create-react-app is not installing with yarnnpx create-react-app 未使用 yarn 安装
【发布时间】:2021-12-29 08:51:38
【问题描述】:

我正在使用npx create-react-app <app-name> 创建反应应用程序。我已经在我的机器上安装了纱线。使用此命令 react app 正在使用 npm 安装。但之前是用 yarn 安装的。

npm version: 8.3.0
node version: 17.3.0
yarn version: 1.22.17
os: windows 10 pro
git version: 2.34.1.windows.1

之前的安装是这样的:

现在像这样安装:

我想要纱线包管理器而不是节点包管理器。我该怎么做?

【问题讨论】:

标签: reactjs npm create-react-app yarnpkg


【解决方案1】:

尝试: yarn create react-app appname

【讨论】:

    【解决方案2】:

    试试 纱线创建反应应用程序我的应用程序。 ... npm start 或 yarn start。在开发模式下运行应用程序。 ...

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 2022-01-22
    • 2020-10-22
    • 2019-05-08
    • 2021-12-02
    • 2021-09-07
    • 2021-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多