【问题标题】:We no longer support global installation of Create React App我们不再支持全局安装 Create React App
【发布时间】:2021-12-26 09:44:33
【问题描述】:

据我所知,我已经在全球范围内安装了 sanity 和 nodemon,任何人都可以解释这是什么,它们也是不允许的?

PS C:\Users\Rupesh Gupta\Documents\GitHub\PinShare\pinshare_frontend> npx create-react-app@next --scripts-version=@next --template=cra-template@next ./

您正在运行create-react-app 5.0.0-next.60+6a3315b7,它落后于最新版本 (5.0.0)。

我们不再支持全局安装 Create React App。

请使用以下命令之一删除所有全局安装:

  • npm 卸载 -g create-react-app
  • yarn 全局删除 create-react-app

可在此处找到有关创建新应用的最新说明: https://create-react-app.dev/docs/getting-started/

PS C:\Users\Rupesh Gupta\Documents\GitHub\PinShare\pinshare_frontend>

【问题讨论】:

    标签: installation create-react-app global


    【解决方案1】:

    我在那个项目上遇到了同样的问题。我通过运行解决了它

    npx clear-npx-cache
    

    然后

    npx create-react-app@latest ./ --use-npm
    

    "./" 如果你已经在你想要 CRA 进入的文件夹中,或者 "your-project-name" 如果你不是。

    【讨论】:

    • 天才!即使您已经卸载了所有 create-react-app 版本,这也有效
    猜你喜欢
    • 2022-01-21
    • 2021-03-16
    • 2017-06-10
    • 2020-04-19
    • 1970-01-01
    • 2022-01-17
    • 2017-09-11
    • 2018-10-04
    • 1970-01-01
    相关资源
    最近更新 更多