0

When I start to create a new react app, and run -npx create-react-app my-app, I see after installing reactand other modules, it is deleting all file folder. Below is the code details found in cmd. ... ├─ react-scripts@3.0.0 └─ react@16.8.6 Done in 422.17s. Error: EPERM: operation not permitted, open 'C:\Users\lenovo.yarnrc'

Aborting installation. yarnpkg add --exact react react-dom react-scripts --cwd D:\test\project\react\my-app has failed.

Deleting generated file... node_modules Deleting generated file... package.json Deleting generated file... yarn.lock Deleting my-app/ from D:\test\project\react Done.

D:\test\project\react>

Screen-shot of Command line tool as CMD lines after create-new-app

System And version: Windows10 node@10.15.3 npm@6.9.0 yarn@1.15.2 npx@6.9.0

2 Answers2

0

Check out the solutions provided for npm - EPERM: operation not permitted on Windows here

If nothing works try downloading over different internet connection as well.

geek
  • 333
  • 3
  • 14
  • 1. Run cmd as administrator 2. Run npm config edit (You will get notepad editor) ************************************ getting below error – user2790547 May 04 '19 at 06:13
  • 1
    C:\WINDOWS\system32>npm config edit npm ERR! path C:\Users\lenovo\.npmrc npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall open npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\lenovo\.npmrc' npm ERR! { [Error: EPERM: operation not permitted, open 'C:\Users\lenovo\.npmrc'] npm ERR! stack: npm ERR! 'Error: EPERM: operation not permitted, open \'C:\\Users\\lenovo\\.npmrc\'', npm ERR! errno: -4048, – user2790547 May 04 '19 at 06:17
0

Please remove any global installs with one of the following commands:

npm uninstall -g create-react-app
yarn global remove create-react-app

The latest instructions for creating a new app can be found here: https://create-react-app.dev/docs/getting-started/

bguiz
  • 22,661
  • 40
  • 140
  • 226