我正在尝试运行create-react-app,但它似乎没有按预期的方式运行。我正在尝试以下命令:
create-react-app my-appcd my-appnpm start
并在尝试运行时出现以下错误,如果您能提供帮助,将在此处输入图像描述会很棒
请全局删除create-react-app试试这个npm remove -g create-react-app
然后只需运行这些命令
npx create-react-app my-app
cd my-app
npm start
你分享的日志说,创建不成功,你使用的create-react-app版本很旧。
更好地使用npx它将确保您在没有任何全局安装的情况下即时使用最新版本。试试下面的命令
$ npx create-react-app festudents
尝试删除 creat-react-app 样板,然后使用以下命令创建一个新样板
npx create-react-app my-app 2