【问题标题】:I can't create new app with create-react-app我无法使用 create-react-app 创建新应用
【发布时间】:2022-01-16 05:25:00
【问题描述】:

无论如何我都无法修复它。我已经重新安装了 node.js 大概 8 次。当我谷歌时,每个人都说运行这个命令npm uninstall -g create-react-app。它没有得到修复。它一次又一次地给出同样的问题。我试过npm audit fix --force,每次它只发现100多个漏洞并再次修复它们(减少到0)。我不知道该怎么办。

【问题讨论】:

  • 您有node_modules 文件夹或package.json 中的C:\Users\yusif 吗?
  • 这会返回什么npm -v create-react-app
  • npm 缓存清理 --force
  • 是的,阿米尔,我两个都有。 node_modules 和 package.json。虽然我不知道你在说哪个 package.json。在 node_modules 文件夹中还是分开的?

标签: node.js reactjs npm command-line


【解决方案1】:

我修好了。在尝试了很多技巧之后,我终于搞定了。

npx --ignore-existing create-react-app
npx create-react-app@latest

这对我有用:

npm uninstall create-react-app
npm update

【讨论】:

    猜你喜欢
    • 2020-06-14
    • 1970-01-01
    • 1970-01-01
    • 2020-09-16
    • 2019-11-29
    • 1970-01-01
    • 2022-10-20
    • 2019-10-15
    相关资源
    最近更新 更多