【问题标题】:The command `npx create-react-app my-app` does not create an application file命令 `npx create-react-app my-app` 不会创建应用程序文件
【发布时间】:2022-01-25 13:38:26
【问题描述】:

我想安装react-create-app。我正在使用命令:npx create-react-app my-app。在控制台可以看到如下信息:

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template ... added 1374 packages in 4m 163 packages are looking for funding run npm fund for details

什么都没有发生。

node 和 npm 是最新的

在我刚刚创建的文件夹中,我只能看到node-modules, package, package-lock。我没有文件src。如何解决这个问题?

【问题讨论】:

    标签: javascript reactjs react-create-app


    【解决方案1】:

    尝试以下步骤:

    1. npm rm -g create-react-app
    2. npm install -g create-react-app
    3. npx create-react-app my-app

    更新

    1. 安装纱线 (https://yarnpkg.com/getting-started/install)
    2. 用 yarn 安装 CRA!
    yarn create react-app my-app
    

    【讨论】:

    • 我试过了,还是不行
    • 您应该使用其他包管理器安装 CRA。试试 yarn create react-app my-app!
    • @Umbro 你好我编辑我的解决方案。试试看,告诉我它是否有效!
    • 我使用了yarn。我仍然只看到 3 个文件 node_modules, package, yarn_lock 并且在终端中我看到了依赖项列表和消息 Done in 461.69s. 没有其他反应
    猜你喜欢
    • 2020-08-11
    • 2022-10-20
    • 2021-11-27
    • 2022-06-14
    • 2022-01-07
    • 2021-03-27
    • 2018-01-09
    • 2020-10-31
    • 1970-01-01
    相关资源
    最近更新 更多