I tried to create a new React App using the following command.
npx create-react-app ./
But, It throws the below error,
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\TOSHIBA\AppData\Roaming\npm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\TOSHIBA\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\TOSHIBA\AppData\Local\npm-cache\_logs\2023-07-30T04_29_09_680Z-debug-0.log
2
Answers
You probably need an app name instead of a directory:
If that doesnt work, you can either try elevated permissions or, preferably, change your npm install path to something your user has permissions for:
If that doesnt work, ask yourself:
That should give you some ideas where to go from there.
create-react-app must include the app name, remove ‘./’ and mention the name of the app. Hope your error will be resolved then