Not sure with older Next versions, but the main fix for this is renaming the /app directory into something else. The standalone configuration in the next.config.ts as a solution mentioned above, doesn't work unless you rename the folder refer to this thread too.