[英]Getting error on npm start create-react-app
I am currently learning React. 我目前正在学习React。 I have done: 我已经做好了:
npm i -g create-react-app
(sucessful) npm i -g create-react-app
(成功) create-react-app react-app
(sucessful) create-react-app react-app
(成功) cd react-app
npm start
(error above) npm start
(上面的错误) Output: 输出:
npm start \\Git\\cmd was unexpected .at this time. 此时,npm start \\ Git \\ cmd是意外的。
npm ERR! npm ERR! code ELIFECYCLE 代码ELIFECYCLE
So, what I have tried by searching online: 因此,我尝试通过在线搜索进行尝试:
npm cache clean --force
npm run clear
None solved. 没有解决。 I have read that I should not installed globally but now that it is already instaled (?) can I rollback? 我读过我不应该在全球范围内安装,但是现在已经安装了(?),可以回滚吗? I can't run npm ig create-react-app again. 我无法再次运行npm ig create-react-app。 Thank you 谢谢
Edit: Added screenshot https://i.ibb.co/mNKLskX/Capturar.png 编辑:添加了截图https://i.ibb.co/mNKLskX/Capturar.png
with npm try init
使用npm试试init
npm init react-app my-app
or, try npx
: 或者,尝试npx
:
npx create-react-app my-app
cd my-app
npm start
Have you tried to follow the steps from 'create-react-app'? 您是否尝试按照“ create-react-app”中的步骤进行操作?
`To create a new app, you may choose one of the following methods: `要创建新应用,您可以选择以下方法之一:
npx 像素
npx create-react-app my-app
(npx comes with npm 5.2+ and higher, see instructions for older npm versions) (npx随npm 5.2及更高版本一起提供,请参阅旧版npm的说明)
npm npm
npm init react-app my-app
npm init is available in npm 6+ npm init可在npm 6+中使用
Yarn 纱
yarn create react-app my-app
yarn create is available in Yarn 0.25+` 在纱线0.25+中可以使用yarn create
To have more info: https://github.com/facebook/create-react-app 要了解更多信息,请访问: https : //github.com/facebook/create-react-app
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.