user14367514
user14367514

Reputation:

I'm trying to install react but I keep getting an 'Error: EPERM: operation not permitted'

I've been trying to install react using npx create-react-app ./ That didn''t work so I tried npm init react-app my-app and it still didn't work. The error im getting says

Error: EPERM: operation not permitted, mkdir 'C:\Users\Yanki' command not found: create-react-app PS C: \Users\Yanki XXIV\Desktop\E-commerce-practice>

Upvotes: 0

Views: 104

Answers (3)

Sujoy Dutta
Sujoy Dutta

Reputation: 37

I found this answer it helped me so I hope this helps. Below is the link https://stackoverflow.com/a/65516052/8195649

Go to c:/users open command prompt and run dir /x check shorter name you found with dir/x as shown in image and run npm config set cache "C:/Users/<shortname-you-found-with-dir/x>/AppData/Roaming/npm-cache" --global

Upvotes: 0

Ankita Shrivastava
Ankita Shrivastava

Reputation: 69

I think you will need to have version of Node>=10.16 and version of NPM >=5.6 If this is still not resolved then try this:

  1. Clean cache with
  • npm cache clean --force
  1. Install the latest version of NPM globally as admin:
  • npm install -g npm@latest --force

3.clean cache with

  • npm cache clean --force

Upvotes: 1

mes
mes

Reputation: 1

I've never seen the ./ inclusion when creating a react app, but that's not to say it's wrong... maybe just follow the docs here and use: npx create-react-app my-app

Upvotes: 0

Related Questions