create-react-app 我的节点14.16.0运行不佳,尽管已经安装了两次,我使用的是Win10系统,

hs1ihplo  于 22天前  发布在  React
关注(0)|答案(5)|浏览(20)

Describe the bug

(Write your answer here.)

Did you try recovering your dependencies?

(Write your answer here.)

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Environment

(paste the output of the command here.)

Steps to reproduce

(Write your steps here:)

Expected behavior

(Write what you thought would happen.)

Actual behavior

(Write what happened. Please add screenshots!)

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

I am not able create react apps or work well with Node. Please help me out.

4smxwvx5

4smxwvx51#

在运行npm cache clean --force时,如本文中提到的解决方案应该适用于您。

pepwfjgg

pepwfjgg2#

作为在issue运行npm cache clean --force中提到的解决方案,它应该适用于您。
好的,伙计,我现在就去尝试。谢谢。

5q4ezhmt

5q4ezhmt3#

作为附注,无需使用您首先运行的 npm install create-react-app -g 命令全局安装 create-react-app
npx create-react-app whatever 将拉取最新版本并运行它。
我不确定全局安装是否可能导致问题,但在 Readme(https://github.com/facebook/create-react-app#quick-overview)中提到,建议卸载全局安装的版本(如果您已全局安装),并改用 npx

pxiryf3j

pxiryf3j4#

作为附注,无需使用您首先运行的 npm install create-react-app -g 命令全局安装 create-react-app
npx create-react-app whatever 将拉取最新版本并运行它。
我不确定全局安装是否可能导致问题,但在 Readme(https://github.com/facebook/create-react-app#quick-overview)中提到,建议卸载全局安装的版本(如果您已全局安装),并改用 npx
好的......
如果您对 NodeJs 和 React 有任何指导意见,请告诉我。我正在开始构建一个应用程序,为我的创业公司展示投资者的网站后端。否则,我想转向 Xamarin,如果情况持续存在的话。

8yoxcaq7

8yoxcaq75#

作为附注,无需使用您首先运行的 npm install create-react-app -g 命令全局安装 create-react-app
npx create-react-app whatever 将拉取最新版本并运行它。
我不确定全局安装是否可能导致问题,但在 Readme(https://github.com/facebook/create-react-app#quick-overview)中提到,建议卸载全局安装的版本(如果您已全局安装),并使用 npx 代替。
好的......
如果您对 NodeJs 和 React 有任何指导,请告诉我。我正在开始构建一个应用程序,为我的创业公司展示投资者的网站后端。否则,我想转向 Xamarin,如果情况持续存在。
npm cache clean --force 是否像上面的人建议的那样工作?您需要提供更多信息,以便更容易地帮助他人。
我真的无法为您提供任何特殊指导。对我来说,运行 npx create-react-app folder-name 总是有效的,它会创建一个我可以毫无问题地运行的新项目。
要么尝试上面建议的方法,或者按照文档中概述的步骤(https://github.com/facebook/create-react-app#creating-an-app)进行操作。我猜您并没有真正遵循这些步骤,因为您首先执行的是全局安装 CRA,而这在文档中没有提及。
请确保使用 npm uninstall -g create-react-app 卸载全局 CRA 安装,以避免潜在问题,并仅使用文档中列出的 npx 命令引导应用程序。

相关问题