我目前正在学习React。我做过:
输出:
>
npm错误!代码ELIFECYCLE 所以,我在网上搜索了一下: 都没有解决。我读到我不应该全局安装,但现在它已经安装了(?)我可以回滚吗?我不能再次运行npm I g create-react-app。谢谢 编辑:添加截图https://i.ibb.co/mnklskx/capturar.png
使用npm尝试
npm init react-app my-app
或者,尝试
npx create-react-app my-app
cd my-app
npm start
你试过按照“创建-反应-应用”的步骤做吗?
要创建新应用程序,您可以选择以下方法之一:
NPX
npx create-react-app my-app
(npx随npm 5.2+及更高版本一起提供,请参阅有关较旧npm版本的说明)
NPM
npm init react-app my-app
npm init在npm 6+中可用
纱线
yarn create react-app my-app
纱线创建以纱线0.25+`提供
欲了解更多信息,请访问https://github.com/facebook/create-react-app