Netlify dev not running

Site name

Get the following error when trying to run netlify dev for a Next.js and Tina Cms website. Been working fine all week until today.

Waiting for framework port 3000. This can be configured using the ‘targetPort’ property in the netlify.toml
WARN[0007] Error creating the websocket connection
error=“dial tcp [::1]:8888: connect: connection refused”
FATA[0007] Connection error
error=“Error connecting to the local websocket: dial tcp [::1]:8888: connect: connection refused”

Hi @niftycode, thanks for the post and welcome to the Netlify Support Forums.

Since you are running netlify dev, do you have a netlify.toml file in your project root?

If you want to run your project with netlify dev in your Nextjs application, your project root needs to have a netlify.toml file with the content below

  command = "npm run dev"
  targetPort = 3000

You can replace the dev command with yarn e.g command = "yarn dev" e.t.c in case you are using yarn

You can read more information about the Netlify Cli and configurations at the link below