Netlify-cli dev is opening 2 browser tabs

When I run ntl dev two browser tabs are opened, one with the port and one with the target port.

This behaviour started after I updated my netlify-cli (netlify-cli/2.63.2 linux-x64 node-v12.18.1).

I’m wondering now if this is a “bug”, or a misconfiguration.

This is my netlify.toml:

  command = "npm run build"
  publish = "dist"

  environment = { NODE_VERSION = "12.18.1", NODE_ENV = "production" }

  command = "npm start"
  publish = "build"
  port = 3000
  targetPort = 8080
  framework = "#custom"
  NODE_ENV = "development"

Thanks in advance!

Hi Stefan,

Does your start script set to open a browser window? I think netlify dev might be start one up as well. If you could, can you try changing your setting to not open a new window and see if that helps?

:man_facepalming: I could have thought of this myself!

Thank you :+1:

1 Like