Reputation: 23
I want to create a frontend project using
npx create-react-app frontend
encountered an error saying
npm ERR! code ENOENT npm ERR! syscall lstat npm ERR! path C:\Users\user\AppData\Roaming\npm npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\user\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\user\AppData\Local\npm-cache_logs\2024-03-06T09_13_21_921Z-debug-0.log
Tried browsing for answers but in browsing hell already.
I tried using Vite
which is much easier but the folder structure of what I'm watching in YouTube is different so I get more confused.
Upvotes: 0
Views: 66
Reputation: 23
Weird, but I fixed it by running the following command in the terminal:
npm install -g npm@latest
Upvotes: 1
Reputation: 427
This error occurs because there isn't 'npm' folder in 'C:\Users\user\AppData\Roaming' Folder in your computer. I guess you change your computer name recently. Am I right? To fix this error, you should copy 'npm' folder in 'C:\Users\user\AppData\Roaming' Folder in your computer from others... And then try again...
Upvotes: 2