next-learn icon indicating copy to clipboard operation
next-learn copied to clipboard

I couldn't creat a next js in node

Open TYB-hue opened this issue 1 year ago • 2 comments

when I open node js and write the code (npx create-next-app nextjs-blog) it show me:

npm ERR! code ENOENT npm ERR! syscall lstat npm ERR! path C:\Users\ahmed\AppData\Roaming\npm npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\ahmed\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\ahmed\AppData\Local\npm-cache_logs\2024-02-14T09_59_02_472Z-debug-0.log

TYB-hue avatar Feb 14 '24 10:02 TYB-hue

I'm by no means an expert in nodejs, but I think this issue may not be related to next, but rather with your nodejs installation, consider taking these steps:

  1. delete and re-install nodejs, in a different folder
  2. make sure your PATH variable uses the right node
  3. try npm i again
  4. I think the issue may be permissions, multiple node installations, or even the use of wsl, I think maybe that is the cause, but keep In mind I'm just a stranger on the internet, I'm not an expert or aything like that.
  5. also, consider linux for development

dataf3l avatar Mar 01 '24 22:03 dataf3l

Thank you

TYB-hue avatar Mar 02 '24 15:03 TYB-hue