Next.js Discord

Discord Forum

just started learning nextjs and already getting an error

Answered
ayrreervae posted this in #help-forum
Open in Discord
i am literally at the second step on the learn page, which is
npm run dev

and i get this error
Answered by ayrreervae
running it from windows cmd doesn't cause the error
View full answer

30 Replies

Can you send your code?
it's literally the template from nextjs learn page
npx create-next-app@latest nextjs-dashboard --use-npm --example "https://github.com/vercel/next-learn/tree/main/dashboard/starter-example"
i ran that and then
npm run dev
right after as the documentation says
i did a quick search
and apparently that only happens on vscode terminal
tried it, and yes.
running it from windows cmd doesn't cause the error
Answer
@ayrreervae and apparently that only happens on vscode terminal tried it, and yes.
I guess powershell doesn't have permission to run scripts
i have created nextjs projects from scratch and they worked fine. tried deleting .next folder and
npm i
nothing changed. imma restart real quick and update node js
For vscode terminal, try changing path to git bash
Restarting did nothing
Also, before changing path, try this
If it doesn't work, I'll just use cmd for running. I love how the nextjs updates in real time
Ok
What's weird is i made some projects for learning yesterday and everything was fine.
Is your issue resolved?
@Anay-208 | Ping in replies so it should be fine today also
Difference is i made projects yesterday from scratch.
Unlike today which is me basically importing a repo
well ya, there can be some differences
Original message was deleted
if you don't need any other help, mark the most helpful channel in this thread as a solution
Original message was deleted
.
Will do. I haven't tried your suggestion yet
I'll now
nothing worked 🤷‍♂️
i just ran the development server in cmd
@ayrreervae running it from windows cmd doesn't cause the error
so, this is a workaround, not a solution. but good enough for me.
How?
I placed a ✅ on it
Right click, apps>mark solution
Oh that's cool