create-react-app

0qx6xfy6  于 3个月前  发布在  React
关注(0)|答案(1)|浏览(97)

不断变化让人烦躁。npx create-react-app不再起作用。它给出了不再支持的说明。它要求你卸载全局的东西。你卸载了全局的东西。但它还是不工作,因为它要求你重新安装全局的东西。然后它引导你到一个链接,告诉你必须卸载全局的东西。Angular现在看起来真的很好。

PS C:\Users\User\Code\mysite\frontend> npx create-react-app .
需要安装以下软件包:
create-react-app
是否继续?(y) y
您正在运行 create-react-app 4.0.3,这是最新版本(5.0.1)的落后版本。
我们不再支持全局安装Create React App。
请使用以下命令之一删除任何全局安装:

  • npm uninstall -g create-react-app
  • yarn global remove create-react-app

创建新应用的最新说明可以在这里找到:
https://create-react-app.dev/docs/getting-started/
如果你运行 - npm uninstall -g create-react-app,你会得到这个:
已是最新,审计了1个包,耗时300ms
未发现漏洞
然后:如果你运行 npx create-react-app .,你会得到这个:
需要安装以下软件包:
create-react-app
是否继续?(y)
你点击了是,然后重复、重复、重复......

eni9jsuy

eni9jsuy1#

尝试这个。

$ npx clear-npx-cache
Need to install the following packages:
  clear-npx-cache
Ok to proceed? (y) y

相关问题