I’m trying to create a new Next.js project using "create-next-app" but I’m getting the following errors. How can I run this command?
PS C:Usersgizem> npx create-next-app@latest my-app –typescript –tailwind –eslint
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:UsersgizemAppDataRoamingnpm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat ‘C:UsersgizemAppDataRoamingnpm’
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:UsersgizemAppDataLocalnpm-cache_logs2023-10-31T08_18_34_114Z-debug-0.log
I checked if npm is available but there is no problem. Changing the index and trying again did not change the result.
2
Answers
Run these commands one by one
try again
create-next-app@latest
if this doesnot work, try renaming your file name
sometimes after installing node js and npm, system needs restart, try doing that and npx create-next-app@latest my-app
hope this helps