This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I've used npx create-next-app@latest
more times than I can count but it keeps throwing this error on my new rig:
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\renegadellama\AppData\Roaming\npm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\renegadellama\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: npm ERR! C:\Users\renegadellama\AppData\Local\npm-cache_logs\2023-07-02T04_19_41_314Z-debug-0.log
I've done a ton of troubleshooting and can't seem to figure this out. I've tired:
- Running the command in PowerShell as admin
npm clean cache --force
npx create-next-app@latest app-name
&--use-npm
For context my node --version
is 18.16.1
and my npm --version
is 9.5.1
Seems like Node is working fine. I've cloned a few of my old repos and npm run dev
spins them up just fine.
Anyone know how to fix this?
Solved
Just had to create the \AppData\Roaming\npm
directory. Not sure why this wasn't created when Node was installed multiple times but there's the fix if anyone encounters this error in the future.
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/reactjs/com...