Describe the bug
I am getting the following error when trying to deploy a SSR-supported next.js application to Azure Static App from Azure Pipelines

The structure of the project is very straight forward , the package.json file is on the root folder, the .next folder gets generated under the root folder as well , the folders inside the root look like the image below, please notice that the pages folder sits under /src/pages:

I added a buildAz task, so to create an empty node_modules under the generated .next folder after the build, following the approach detailed on this thread, but the issue seems unrelated:
This is how the azure pipelines looks like:

Expected behavior
Being able to deploy to Azure Static Web apps our existing next.js project without losing the SSR capabilities of next.js as it is now supported https://aka.ms/swa-nextjs-ssr-blog