为什么当我安装react app时,会出现此错误?

时间:2020-05-30 16:20:29

标签: node.js reactjs npm

所以我不知道我的电脑在做什么,我问的每个人都说这很奇怪,他们以前从未见过,所以我希望这里的人能在我买另一台电脑之前为我提供帮助... jk

您在此处看到的此屏幕截图是我运行“ npm create-react-app

后会发生的情况

idk为什么只呆在那里,并且它只给出三个文件,而不是给我提供我的React应用程序(例如public,SRC)所需的所有文件

如果有人向我发送了包含所有正确文件的文件夹,我无法运行react应用并对其进行处理,则问题是我由于某种原因无法创建,而我的OCD确实使我丧命。 / p>

请谢谢! :)

$ npx create-react-app myapp13
Creating a new React app in C:\Users\joesa\Desktop\myapp13.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

yarn add v1.22.4
[1/4] Resolving packages...

[2/4] Fetching packages...

info fsevents@1.2.12: The platform "win32" is incompatible with this module.

info "fsevents@1.2.12" is an optional dependency and failed compatibility check. 

Excluding it from installation.

info fsevents@2.1.2: The platform "win32" is incompatible with this module.

info "fsevents@2.1.2" is an optional dependency and failed compatibility check. 

Excluding it from installation.

[3/4] Linking dependencies...

warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".

[4/4] Building fresh packages...

success Saved lockfile.

success Saved 14 new dependencies.

info Direct dependencies
├─ cra-template@1.0.3
├─ react-dom@16.13.1
├─ react-scripts@3.4.1
└─ react@16.13.1

info All dependencies
├─ @babel/plugin-syntax-typescript@7.10.1
├─ @babel/plugin-transform-flow-strip-types@7.9.0
├─ @babel/plugin-transform-runtime@7.9.0
├─ @babel/plugin-transform-typescript@7.10.1
├─ @babel/preset-typescript@7.9.0
├─ babel-preset-react-app@9.1.2
├─ cra-template@1.0.3
├─ eslint-config-react-app@5.2.1
├─ react-dev-utils@10.2.1
├─ react-dom@16.13.1
├─ react-error-overlay@6.0.7
├─ react-scripts@3.4.1
├─ react@16.13.1
└─ scheduler@0.19.1

Done in 12.46s.

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

尝试一下:

npm uninstall -g create-react-app
npm install -g create-react-app@latest
npx create-react-app testApp