Hello, today my website is down. I did an ordinary deploy and it results in a 404 error. I think that's caused by an automatic export which generates only a static directory on my _next Now output directory. After the usual build, the logs shows that this script beings launched: Running "yarn run now-automatic-next-export".
I'm trying to understand how to avoid/disable this but I can't get it.
Anyone could help me someway?
I’m on list on awwwards for a nominee so this is quite disappointing... Just to not say other...
Thanks in advance
Steps to reproduce the behavior, please provide code snippets or a repository:
The website should be visible


Here's the build log
Running "yarn run now-build"
yarn run v1.17.3
$ next build
Creating an optimized production build...
> Using external babel configuration
> Location: "/zeit/6bb16e1d/babel.config.js"
> Using external babel configuration
> Location: "/zeit/6bb16e1d/.babelrc"
Compiled with warnings.
EnvironmentPlugin - undefined environment variable is undefined.
You can pass an object with default values to suppress this warning.
See https://webpack.js.org/plugins/environment-plugin for example.
EnvironmentPlugin - undefined environment variable is undefined.
You can pass an object with default values to suppress this warning.
See https://webpack.js.org/plugins/environment-plugin for example.
Automatically optimizing pages...
Warning: You have opted-out of Automatic Static Optimization due to `getInitialProps` in `pages/_app`.
Read more: https://err.sh/next.js/opt-out-auto-static-optimization
Page Size
┌ λ / 133 kB
├ /_app 54.6 kB
├ λ /_error 1.5 kB
├ λ /[lang] 133 kB
├ λ /about 132 kB
├ λ /about/[lang] 132 kB
├ λ /api/email
├ λ /contacts 103 kB
├ λ /contacts/[lang] 103 kB
├ λ /cookies 3.73 kB
├ λ /cookies/[lang] 3.75 kB
├ λ /disclaimer 4.58 kB
├ λ /disclaimer/[lang] 4.6 kB
├ λ /legal 35.9 kB
├ λ /legal/[lang] 35.9 kB
├ λ /licenses 3.41 kB
├ λ /licenses/[lang] 3.43 kB
├ λ /portfolio 85.8 kB
├ λ /portfolio-vr 328 kB
├ λ /portfolio-vr/[lang] 328 kB
├ λ /portfolio-web 121 kB
├ λ /portfolio-web/[lang] 121 kB
├ λ /portfolio/[lang] 85.7 kB
├ λ /privacy 41 kB
└ λ /privacy/[lang] 41.1 kB
+ shared by all 120 kB
├ chunks/commons.js 114 kB
├ runtime/main.js 5.04 kB
└ runtime/webpack.js 1.2 kB
λ (Lambda) server-side renders at runtime (uses getInitialProps or getServerProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
Done in 16.85s.
Running "yarn run now-automatic-next-export"
yarn run v1.17.3
$ next export --outdir "/zeit/6bb16e1d/out"
> using build directory: /zeit/6bb16e1d/.next
copying "static build" directory
launching 3 workers
Exporting (0/24)
copying "public" directory
Exporting (1/24)
Exporting (2/24)
Exporting (3/24)
Exporting (4/24)
Exporting (5/24)
Exporting (6/24)
Exporting (7/24)
Exporting (8/24)
Exporting (9/24)
Exporting (10/24)
Exporting (11/24)
Exporting (12/24)
Exporting (13/24)
Exporting (14/24)
Exporting (15/24)
Exporting (16/24)
Exporting (17/24)
Exporting (18/24)
Exporting (19/24)
Exporting (20/24)
Exporting (21/24)
Exporting (22/24)
Exporting (23/24)
Exporting (24/24)
Export successful
Done in 5.48s.
Build completed. Populating build cache...
Plus, I'm targeting the serverless mode and now the platform says that the deploy doesn't have anyone. What's happening please?
Hey do you have a repo to reproduce this? There's a change that you're using next-offline which adds exportPathMap automatically.
There's a workaround: https://spectrum.chat/zeit/now/new-deployment-broken-yarn-run-now-automatic-next-export-gives-me-no-app-content~0de41a49-3dc3-4fe6-80e1-990767a5b5ff?m=MTU3NjYyNDQ4OTIzMw==
And this will be solved soon (not an issue with Now, but Next.js) alternatively you can downgrade to Next.js 9.1.5 temporarily.
Thank you so much @timneutkens for your timely answer. You saved my day. The workaround worked perfectly.
Most helpful comment
Thank you so much @timneutkens for your timely answer. You saved my day. The workaround worked perfectly.