0

This error happened when I was creating my react app - I can not solve it.

Reinstalled node and changed directory from drive of windows but nothing changed.

Thanks for your help

C:\Users\Polymer>W:

W:\>cd CMD

W:\CMD>npx create-react-app my-app
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\Users\Polymer\AppData\Roaming\npm-cache\_cacache\index-v5\2b\1c
\4ede2f97cfb5e7b1fe999329dd5b5252cac9a58995c5659a37aaf25d18cb
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\Polymer\AppData\R
oaming\npm-cache\_cacache\index-v5\2b\1c\4ede2f97cfb5e7b1fe999329dd5b5252cac9a58
995c5659a37aaf25d18cb'
npm ERR!  { [Error: EPERM: operation not permitted, open 'C:\Users\Polymer\AppDa
ta\Roaming\npm-cache\_cacache\index-v5\2b\1c\4ede2f97cfb5e7b1fe999329dd5b5252cac
9a58995c5659a37aaf25d18cb']
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, open 'C:\Users\Polymer\AppD
ata\Roaming\npm-cache\_cacache\index-v5\2b\1c\4ede2f97cfb5e7b1fe999329dd5b5252ca
c9a58995c5659a37aaf25d18cb'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'open',
npm ERR!      path:
npm ERR!       'C:\\Users\\Polymer\\AppData\\Roaming\\npm-cache\\_cacache\\index
-v5\\2b\\1c\\4ede2f97cfb5e7b1fe999329dd5b5252cac9a58995c5659a37aaf25d18cb' },
npm ERR!   isOperational: true,
npm ERR!   stack:
npm ERR!    'Error: EPERM: operation not permitted, open \'C:\\Users\\Polymer\\A
ppData\\Roaming\\npm-cache\\_cacache\\index-v5\\2b\\1c\\4ede2f97cfb5e7b1fe999329
dd5b5252cac9a58995c5659a37aaf25d18cb\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path:
npm ERR!    'C:\\Users\\Polymer\\AppData\\Roaming\\npm-cache\\_cacache\\index-v5
\\2b\\1c\\4ede2f97cfb5e7b1fe999329dd5b5252cac9a58995c5659a37aaf25d18cb' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or ant
ivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check t
he
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!     C:\Users\Polymer\AppData\Roaming\npm-cache\_logs\2020-07-11T19_05_3
5_466Z-debug.log
Install for create-react-app@latest failed with code 4294963248

W:\CMD>create-react-app my-app
'create-react-app' is not recognized as an internal or external command,
operable program or batch file.
RobC
  • 16,905
  • 14
  • 51
  • 62
hamid am
  • 3
  • 1

1 Answers1

0

Open the shell with Run as Administrator or grant owner access to those directories.

npm ERR! { [Error: EPERM: operation not permitted, open 'C:\Users\Polymer\AppDa ta\Roaming\npm-cache_cacache\index-v5\2b\1c\4ede2f97cfb5e7b1fe999329dd5b5252cac 9a58995c5659a37aaf25d18cb'], or try running npm ERR! the command again as root/Administrator. .... suggests permission issues

If this doesn't work - another SO thread suggests multiple approaches, report back if you are still facing issues with a -debug.log preferably

npm - EPERM: operation not permitted on Windows

Ramakay
  • 954
  • 1
  • 12