在我的 windows10 上安装 create-react-app 时出现问题

problems Installing create-react-app on my windows10

我在 windows 10 上安装 create-react-app 时遇到问题。 我已按照这些步骤操作,但它花费的时间太长,然后该过程停止了。 这些是我遵循的步骤:

npm install -g create-react-app

create-react-app myproject

我也尝试过使用此代码安装软件包:

npx create-react-app my-app

但是下载的时间太长了,一直没下载。

提前致谢。

根据文档:

If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app to ensure that npx always uses the latest version.
(npx comes with npm 5.2+ and higher, see instructions for older npm versions)

所以要创建一个新应用程序 运行:

npx create-react-app my-project

这会创建一个名为 my-project 的新应用
要启动应用程序:

cd my-project
npm start

按照this网站上的说明进行操作,您应该能够正确安装 Gatsby 而不会失败。另外,请注意,大多数时候系统会提示您进行审核,这是为了报告依赖项中的漏洞,这并不意味着未安装应用程序或设置,它只是意味着 npm audit fix 命令运行时可以提供修复帮助。在大多数情况下,即使 NPM

发出警告,您的设置或应用程序也应该可以正常工作