Process object used to access environment variables in node is missing after upgrading to 9.5.
Upgraded to nextjs 9.5 and the snippet in the screenshot broke. If I start the app using a command like this NEXT_PUBLIC_LOCAL_FUNCTIONS_PORT=5001 next it works, but if I leave out the environment in the command (i.e. next) it fails.
Tried creating a fresh next app (on 9.5) and was NOT ABLE to reproduce. Might be something with my dependencies.
I expected that env variables would be able to be looked up on the client.

Did you try out the webpack 5 beta? Because that would cause this (expectedly).
@timneutkens just came to the same conclusion, was on webpack 5 beta. Remove it and it works fine :)
Any clue why webpack 5 beta does that? And how I can mitigate it (when it is no longer beta)?
This can be closed
See #13341, webpack 5 does not provide process and Buffer but we will to ensure existing apps don't break.
I merged the PR to add it earlier today btw: https://github.com/vercel/next.js/pull/15499
Most helpful comment
See #13341, webpack 5 does not provide process and Buffer but we will to ensure existing apps don't break.