Erorr While installing npx create-react-app

133 Views Asked by At
PS C:\Users\Administrator\Desktop\React app\Reactapp> npx create-react-app .
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\Administrator\AppData\Roaming\npm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\Administrator\AppData\Roaming\npm'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in: C:\Users\Administrator\AppData\Local\npm-cache\_logs\2023-10-31T20_00_59_399Z-debug-0.log

I have tried a lot but this issue is not getting fixed

2

There are 2 best solutions below

1
On

Try this erorr-while-installing-npx-create-react-app: it worked for me npm install yarn. Then npm rebuild C:\Users\Administrator\AppData\Roaming\npm should help i had the same issue, Best of luck cheers .

0
On

Project names on npm are typically lowercase and can also include hyphens and underscores to separate words. you can give name like react-app or reactapp.

project name cannot contain capital letters. This is specific to npm package naming conventions and doesn't directly relate to React itself.