Bad Port Error When Using Atlas Extension

When creating a new site using the Atlas extension I get the following error;

RangeError [ERR_SOCKET_BAD_PORT]: options.port should be >= 0 and < 65536. Received NaN.
    at new NodeError (node:internal/errors:372:5)
    at validatePort (node:internal/validators:217:11)
    at Server.listen (node:net:1500:5)
    at C:\Users\lewis\Local Sites\headless\app-node\node_modules\next\dist\server\lib\start-server.js:55:16
    at new Promise (<anonymous>)
    at Object.startServer (C:\Users\lewis\Local Sites\headless\app-node\node_modules\next\dist\server\lib\start-server.js:22:12)
    at nextDev (C:\Users\lewis\Local Sites\headless\app-node\node_modules\next\dist\cli\next-dev.js:129:23)
    at C:\Users\lewis\Local Sites\headless\app-node\node_modules\next\dist\bin\next:147:44 {
  code: 'ERR_SOCKET_BAD_PORT'
}

I can see the WordPress side of the installation but the front end section outputs the above in the terminal. I was wondering if anyone else has came across this issue before.

1 Like

When creating from the portfolio blue print I don’t get this error but I do get the following error instead;

error - Could not find NEXT_PUBLIC_WORDPRESS_URL environment variable.

I am running nginx, PHP 8.1.9 with WordPress version 6.1.1 on Local 6.6.1+6281

Hi @lewisself - thanks for checking out Local/Atlas!

What operating system are you on? I’m unable to reproduce this on my machine, but I’m on MacOS Monterey (12.6.3). I’m going to fire up Windows machine and try there!

Hi. I’m having the same issue as lewisself. Im running Windows 10. Any updates @austinwendt ?

Hi @MarianoT - sorry for the delay! Yes, we were able to reproduce the issue on Windows. This has been fixed in the latest Atlas add-on release, v1.6.2.

You can update the Atlas add-on from the Add-ons tab in Local and this should be resolved.

1 Like