Bad Port error with new site created with Atlas Add-on

When I create new a site in Local using the Atlas Add-on, I’m getting an error message when trying to view the site. The Local “Open Site” button yields a 502 error page. When I show the terminal output, it shows this error:

> @faustjs/next-headless-getting-started@0.1.0 dev
> next dev -p $PORT

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

I’m running the latest version of Local (6.5.2+6204) and Atlas Add-on (1.5.1).

New site settings were Nginx, PHP 8.1.9, MySQL 8.0.16

@mjmartin1023 Did you ever determine why this was happening? I am receiving a similar error.

Unfortunately, I determined Atlas wasn’t quite ready yet for our team to seriously consider it and moved on. Maybe when the documents and support are more robust then we’ll give it another try.

Thanks! What did you move to?

I just spun up an Atlas site and when I tried to go to the site I got an error. When trying to run the npm run dev I was getting an error about the port. It seems that I had to go into the folder from the terminal, run npm install then once it was done I then had to restart the site in Local.

Not sure if this helps any. Not the same error, but something I ran into on first run.

Hey @rbaugh, thanks for chiming in with a suggestion! Was the error you saw the same error here? Or am I understanding right that you ran into something else.

And what operating system are you on?

To be honest, I really don’t recall the actual error message anymore but it I know it was an issue that I assumed it would have initialized the project since it was launching the app.

I am running Local 6.6.1+6281 and Atlas v1.6.0 on a Mac OS 12.6

I’ve got the same problem and to fix it you need to:
→ got the the site folder
→ open the package.json in a text editor
→ change the $PORT to your port
ex:

next dev -p $PORT -> next dev -p 10004