Почему я продолжаю получать сообщение об ошибке при попытке установить приложение реакции - PullRequest
0 голосов
/ 18 апреля 2020

Я впервые пробую React, и это очень деморализует, чтобы снова и снова видеть одну и ту же ошибку. Я попробовал все три из этих кодов отдельно
npx create-react-app myapp
npm init react-app myapp
npm install -g create-react-app затем create-react-app myapp

Все, что дало мне:

npm ERR! Unexpected end of JSON input while parsing near '...:"^5.0.0 || ^6.0.0"},'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\{hiddenForPrivacyReasons}\AppData\Roaming\npm-cache\_logs\2020-04-18T14_12_44_513Z-debug.log

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json
Deleting my-app/ from D:\{hiddenForPrivacyReasons}\codes\app
Done.

Помогите !!!

1 Ответ

1 голос
/ 18 апреля 2020

Вам не нужны react-app и другие сценарии

Просто:

npx create-react-app my-app
cd my-app
npm start

См .: документ create-Reaction-app

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...