【问题标题】:Create-react-app hangs when trying to make a reactjs project or intialize it尝试制作 reactjs 项目或初始化它时,Create-react-app 挂起
【发布时间】:2020-10-02 11:55:08
【问题描述】:

我得到了

Creating a new React app in D:\project 
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

它永远挂在那里

我的系统是 - Windows 10,Node - v12.18.0,NPM - 6.14.5

【问题讨论】:

  • 你运行了什么命令?
  • npx create-react-app myapp
  • 在另一个克隆项目“npm install”中 - 它也挂起。但奇怪的是 vuejs 和 nuxtjs 在“npx create-nuxt-app”中运行良好
  • 1.您以前安装过 cra 还是第一次安装? 2.你试过在c盘安装cra吗?
  • 我在过去 2 年里一直在使用 react。并始终将其与 CRA 一起使用。更新到最近的 Windows 更新后,我开始面临这个问题:(

标签: node.js reactjs windows npm create-react-app


【解决方案1】:

您可以尝试以下选项。

  1. CD 驱动器中尝试此命令: create-react-app myapp --use-npm --cache /tmp/empty-cache
  2. 其他尝试,npm install npm@latest -g
  3. 其他尝试,卸载并重新安装 Node。

【讨论】: