Next.js Discord

Discord Forum

Next doesn't run example

Answered
Spectacled bear posted this in #help-forum
Open in Discord
Avatar
Spectacled bearOP
Hi I'm new to js (I used it for a few months ages ago and hated it because of how poor the version control is). I feel I am facing version control issues with next.

I ran:
npx create-next-app@latest nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/master/basics/learn-starter"
cd nextjs-blog
npm run dev

(taken from here: https://nextjs.org/learn/basics/create-nextjs-app/setup)
And get this:
> dev
> next dev

- ready started server on [::]:3000, url: http://localhost:3000

C:\Users\user\Desktop\branches\testnext\nextjs-blog>

It just exits. I had tried this with my own project first and met the same behavior. Tried with different versions of next. What is going on? Please help 🙏

edit: if it helps, my own project exits with:
C:\Users\user\Desktop\branches\test_proj>npm run dev

> frontend@0.1.0 dev
> next dev

- ready started server on [::]:3000, url: http://localhost:3000
- info Using wasm build of next-swc

C:\Users\user\Desktop\branches\test_proj>
Answered by joulev
an alternative would be to develop on linux using WSL, which is what i would recommend here if you are willing to go that far
View full answer

13 Replies

Avatar
1. this is not related to version control
2. try cmd.exe instead of powershell, iirc some users faced this problem but only on powershell
Avatar
Spectacled bearOP
@joulevhi! thanks for the reply
C:\Users\user\Desktop\branches\testnext\nextjs-blog>cmd
Microsoft Windows [Version 10.0.22621.2134]
(c) Microsoft Corporation. All rights reserved.

C:\Users\user\Desktop\branches\testnext\nextjs-blog>npm run dev

> dev
> next dev

- ready started server on [::]:3000, url: http://localhost:3000

C:\Users\user\Desktop\branches\testnext\nextjs-blog>
Avatar
Spectacled bearOP
when I downgraded to 13.1.6 (suggested here https://github.com/vercel/next.js/issues/46961) this seems like progress
Image
(i had to delete so many things to get it to actually downgrade lol)
it went back to the same behavior
Avatar
Spectacled bearOP
Thx for the help. dunno what the issue was really no clue but its working maybe just hadnt deleted enough stuff previously
Avatar
an alternative would be to develop on linux using WSL, which is what i would recommend here if you are willing to go that far
Answer
Avatar
because nextjs is known to have several windows-only bugs that are really weird
nextjs itself is developed mainly on macOS and linux, not windows