0

Начал осваивать REACT. Такая проблема, запускаю в командной строке, чтобы создать проект REACT: create-react-app MyAppName получаю ошибку:

 at JSON.parse (<anonymous>)
    at Object.Module._extensions..json (module.js:668:27)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
    at Module.require (module.js:593:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\xxx\AppData\Roaming\npm\node_modules\create-react-app\createReactApp.js:52:21)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)

прочитал вариант с npx, npx create-react-app myAppName ошибка npx: installed 1 in 12.735s The "path" argument must be of type string C:\Users\Ustas\AppData\Roaming\npm\node_modules\create-react-app\index.js C:\Users\Ustas\AppData\Roaming\npm\node_modules\create-react-app\package.json: Unexpected string in JSON at position 520

прочитал, что нужно NPM версии 4.... , из-за этого проблема. У меня версия NPM 5.6.0

Как установить старую версию, и поможет ли ? Как-то глупо. Может кто подскажет как создать болванку REACT без танца с бубном ? Или откатить NPM до версии 4...

1 ответ 1

1

Вам необходимо установить NVM (Node Version Manager) - это скрипт который позволяет управлять версиями Node. С помощью него вы сможете переключатся между разными версиями Node.

https://github.com/creationix/nvm

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.