使用 create-react-app 我得到 EEXIST: 文件已存在

061*_*wat 2 javascript node.js reactjs npx

我正在制作我的第一个反应应用程序并运行命令:npx create-react-app my-app并且我收到此错误:

Error: EEXIST: file already exists, mkdir 'C:\Users\Deepak'

command not found: create-react-app

有人可以帮我解决这个错误吗?

小智 5

按照以下步骤操作,肯定会有效:

  1. npm uninstall -g create-react-app
  2. npm install -g create-react-app
  3. npx create-react-app the-name-of-your-app