[英]Receiving error when creating new app using create react app
Have you tried it without the additional --use-npm
flags at the end?您是否在最后没有附加--use-npm
标志的情况下尝试过?
npx create-react-app user-onboarding
cd user-onboarding
npm start
Edit: Yeah, reading your errors in the screenshot it appears that the --use-npm
flag is causing it to use npm which has outdated versions available, but npx
always finds the newest versions.编辑:是的,在屏幕截图中阅读您的错误似乎是--use-npm
标志导致它使用 npm 可用的过时版本,但npx
总是找到最新版本。 Which is a big reason it is the preferred method for installing create-react-app
这是安装create-react-app
的首选方法的一个重要原因
If you have your heart set on using npm
you can always do an npm update
before running it again.如果您决心使用npm
,您可以在再次运行之前始终进行npm update
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.