Atlas sites wont connect to the front-end. 502 error

I just did a new install of Local(6.2.5711) on MacOS 10.15.7, installed Atlas addon and created a new site with it.
I can access the admin panel, but the front end returns a 502 error. the log shows this

2022/02/01 01:56:11 [error] 9974#0: *7 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: ::1, server: atlaswpengine.local, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:10010/", host: "atlaswpengine.local"

When I click on Show Output for Node.js it shows this

> next dev -p $PORT

ready - started server on 0.0.0.0:10010, url: http://localhost:10010
info  - Loaded env from /Users/alex/Local Sites/atlaswpengine/app-node/.env.local
It looks like youre trying to use TypeScript but do not have the required package(s) installed.

Please install @types/node by running:

        npm install --save-dev @types/node

If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your pages directory).

The lighting log doesn’t show anything out of order.

What am I missing?

Also, what does this mean? Where do I run this command? Doesn’t Local run Node.js in its container? Or do we need to run our own Node.js?
Screenshot 2022-02-01 at 02.03.19

Would love to see a response to this, I have the exact same problem.

Hey all,

We have resolved the missing TypeScript dependencies in a merge to the Faust.js repo. If you create a new site, you’ll no longer see the errors. For existing sites, you can navigate to your site’s app-node/node_modules folder and run the command shown in that window. “npm install --save-dev @types/node”

You can jump into your site’s structure easily from within Local. Right-click on the site’s name in the site list on the left-hand side of the app and choose “Open Site Shell”.

With this resolved, we’re also looking into an error message that users are seeing regarding a missing binary. This is related to a recent upgrade to Next.js; we have identified a fix and hope to push that out early next week. Users have been able to solve this issue themselves by following this guide from Next.js - failed-loading-swc | Next.js

Thanks,
Austin Wendt, WP Engine

Also, @AlexReds - to address your question around the Start Command: you’re correct, Local is running a Node.js server on your computer at the host URL found right below the “Start Command” line from your screenshot. There is no need to run the command yourself, it is meant to provide context for which command is run to start the Node.js process on your computer should you wish to make changes.

Still having this problem even after running “npm install --save-dev @types/node”


But when I do ‘npm run dev’ the same error comes up. Whenever I start the site from Local, I get a 502 request error. The admin panel works.

Hi,
I spent all day with this issue, having spent all day yesterday updating 8 VM window 11 machines, and it is on these i have been tinkering with Local as i learn wp! anyway, just by chance, i minimized local, after clicking the Admin which has been giving me the 502 error… only to notice that Win 11 was asking to allow/block an access request for local (all updated to todays version)… Clicked to OK it, problem resolved… May be as i use VMWare, may be it is what is causing the issue on all this thread, so worth a try… (i am techno-crappy, this could just be a fluke on my VM)