Next.js Discord

Discord Forum

Can't use next start

Unanswered
Scottish Fold posted this in #help-forum
Open in Discord
Scottish FoldOP
I'm trying to setup the localhost to 0.0.0.0, but when I type "next start" in the terminal, it says "zsh: command not found: next" and when trying to run "npm next dev" it says "Unknown command: next"
I'm just trying to display my app on 0.0.0.0, can I get some help?
I'm running VSCode on Mac.

2 Replies

Himalayan
Try and delete your node_modules folder and install the dependencies again.
Toyger
you need running next through scripts from package.json like
npm run dev which will run next as dev
if you want to run dev directly as next package you can use
npm exec -- next
but it's more symbols to input, npm run through scripts in package.json is easier