Is this my first test? I'm failing!
Unanswered
Nick posted this in #help-forum
NickOP
Hi all.
Trying the first command in the dashboard app tutorial and it seems to be having a problem?
Both npx (10.2.4) and node (20.11.1) are available in, and the code is run from, the project directory 🙂 Not sure what I'm doing wrong tbh!
Thanks,
Nick
*Oh and in case it helps more generally, the discord channel seemed to put me into a tutorial channel I didn't have permission for when I first joined
Trying the first command in the dashboard app tutorial and it seems to be having a problem?
npx create-next-app@latest nextjs-dashboard --use-npm --example "https://github.com/vercel/next-learn/tree/main/dashboard/starter-example") npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\Nick Woodward\AppData\Roaming\npm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\Nick Woodward\AppData\Roaming\npm'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
Both npx (10.2.4) and node (20.11.1) are available in, and the code is run from, the project directory 🙂 Not sure what I'm doing wrong tbh!
Thanks,
Nick
*Oh and in case it helps more generally, the discord channel seemed to put me into a tutorial channel I didn't have permission for when I first joined
13 Replies
Toyger
problem that your windows username which is your full name have space in it "Nick Woodward", which end up in path to project.
nodejs don't like path with spaces.
you can use WSL2 if you know how to work with it
or you can create another user in windows without space in name and use it.
nodejs don't like path with spaces.
you can use WSL2 if you know how to work with it
or you can create another user in windows without space in name and use it.
NickOP
Hi Horus. Thanks for the reply. I'm just a bit confused though: I've been coding on this laptop for a while with no issues. It's just when I've tried this nextjs project?
Creating a new user seems a bit much?
can I use a different terminal? is it a windows thing?
@Nick Hi Horus. Thanks for the reply. I'm just a bit confused though: I've been coding on this laptop for a while with no issues. It's just when I've tried this nextjs project?
Toyger
hard to say, it can be some specific library that have problems with space, either some specific feature of nodejs that right now used when installing, buti am 99.99999% sure that it is problem with space in path.
different terminal will not wark path will remain same, and if I remember correctly there is no way to change npm path also. And definetely no way to change user folder name.
So if you know basics of linux, use WSL2 otherwise you need to create new user.
different terminal will not wark path will remain same, and if I remember correctly there is no way to change npm path also. And definetely no way to change user folder name.
So if you know basics of linux, use WSL2 otherwise you need to create new user.
NickOP
Ok cool, thanks. That's kind of why I asked about another terminal - hoped something like bash was the equivalent of WSL2 (which I think I do have on this version of windows)
@Toyger hard to say, it can be some specific library that have problems with space, either some specific feature of nodejs that right now used when installing, buti am 99.99999% sure that it is problem with space in path.
different terminal will not wark path will remain same, and if I remember correctly there is no way to change npm path also. And definetely no way to change user folder name.
So if you know basics of linux, use WSL2 otherwise you need to create new user.
NickOP
Hey horus, I don't know why I didn't check at the time, but the npm folder doesn't exist in that location. I guess I made a mistake when initially installing npm? Was just hoping you might have an opinion on whether reinstalling npm would fix this? Don't want to blindly apply fixes and make things harder to debug!
@Nick Hey horus, I don't know why I didn't check at the time, but the npm folder doesn't exist in that location. I guess I made a mistake when initially installing npm? Was just hoping you might have an opinion on whether reinstalling npm would fix this? Don't want to blindly apply fixes and make things harder to debug!
Toyger
can you show screenshot of path you checked?
if you can't find AppData it's hidden by default, like system protected directory
but if you'll enter it in path just copy paste into path box in explorer, and press enter it will open directory
if you can't find AppData it's hidden by default, like system protected directory
but if you'll enter it in path just copy paste into path box in explorer, and press enter it will open directory
NickOP
@Nick Click to see attachment
Toyger
hmm, it strange, it should have been installed with nodejs, you can try to reinstall nodejs then.
also you can try this solution https://github.com/npm/cli/issues/6971#issuecomment-1923670428
NickOP
Thanks, will do 🙂
NickOP
Yeah the fix in the link worked