Cannot run netlify dev locally

Hi,

I’m pretty new to Nelify and have been encountered a problem lately when trying to run this command netlify dev to run the server locally I get the following error:

"npm run build" exited with code 0. Shutting down Netlify Dev server

My Netlify site name: https://nervous-minsky-4dcffc.netlify.app/
My netlify.toml file has the following configs:
[build]
command = “npm install --prefix=functions && npm run build && npm run export”
publish = “out”
functions = “functions”

There are no error while deploying on netlify just when I try to run it locally. Could please someone offer me some hints on what might be wrong?

hi there! first off, are you using the most recent version of netlify dev? if yes, would you please file an issue here so we can take a look?

Hi Perry,

Thanks for you reply!
Yes, I’m using the most recent version. I’ve opened an issue on github: netlify-cli: cannot start dev server locally · Issue #1989 · netlify/cli · GitHub

Are you experiencing the same behavior when you’re running next build locally? It seems netlify dev is trying to do just that…

yeah, I get. the same output when I run next build

just a quick follow up on this in case anyone else encounters this issue.
I’ve changed my netlify.toml file to have this config and my dev server started properly
[dev]
framework = “next”
command = “npm run dev”

1 Like

Hey there, @oanaOM !

Thanks fo much for sharing your solution with us, we always appreciate it. Like you said, it could definitely help if any other Forums members find themselves in a similar situation.

1 Like