0

Коллеги, помогите пожалуйста решить проблему с созданием нового приложения через create-react-app my-app т.к. выдает следующую ошибку :

MacBook-Pro-G:projects $ npx create-react-app my-app
Need to install the following packages:
  create-react-app
Ok to proceed? (y) y

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.
Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

Но все инструкции мне не сильно помогли. npm/npx -v = 7.15.1 Работаю на МасОS Чистил кеш и перезагружался

если следовать инструкциям и снести а затем попробовать поставить через npm un/install -g выдает кучу ошибок

MacBook-Pro-G:projects G$ npm install -g create-react-app
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/create-react-app
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/create-react-app'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/create-react-app'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib/node_modules/create-react-app'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Genjo/.npm/_logs/2021-12-20T17_18_12_129Z-debug.log
0

1 ответ 1

0

Разобрался. Помогло целиком переустановить ноду. 1 - sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}

2 - rm -rf ~/.npm потом с сайта поставил - все заработало

Надеюсь кому то поможет если что

Ваш ответ

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

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