Next.js 13 site all pages resolve to the error page

Hi,

I’ve had a next.js site deployed with Netlify for some time. I’ve recently upgrade the site to use Next.js 13/Mui v5 and whole manner of other improvements.

However, when it comes to getting the site deployed, I’ve been running into issue after issue. I’ve tried the exact same config that I was using with the current live site to no avail…

The Next.js site has some static pages and some SSR pages. Most of the pages are static though but the redirects that I’m seeing in the build log seem to suggest that everything is being redirected to

6:00:33 PM:   {
6:00:33 PM:     from: '/*',
6:00:33 PM:     to: '/.netlify/functions/___netlify-handler',
6:00:33 PM:     status: 200,
6:00:33 PM:     conditions: { Cookie: [Array] },
6:00:33 PM:     force: true
6:00:33 PM:   },
build-image version: 91488c6c0412f5c1c00fb34eff5c1fc41a32bce9 (focal)
buildbot version: 91488c6c0412f5c1c00fb34eff5c1fc41a32bce9
Fetching cached dependencies
Starting to download cache of 1.3GB
Finished downloading cache in 3.225s
Starting to extract cache
Finished extracting cache in 13.512s
Finished fetching cache in 16.937s
Starting to prepare the repo for build
Preparing Git Reference pull/50/head
Parsing package.json dependencies
Starting to install dependencies
Python version set to 3.8
Attempting Ruby version 2.7.2, read from environment
Using Ruby version 2.7.2
Started restoring cached go cache
Finished restoring cached go cache
Installing Go version 1.19.5 (requested 1.19.5)
go version go1.19.5 linux/amd64
Using PHP version 8.0
Started restoring cached Node.js version
Finished restoring cached Node.js version
Attempting Node.js version '18' from .nvmrc
v18.16.0 is already installed.
Now using node v18.16.0 (npm v9.5.1)
Enabling Node.js Corepack
Started restoring cached build plugins
Finished restoring cached build plugins
Started restoring cached corepack dependencies
Finished restoring cached corepack dependencies
Started restoring cached yarn cache
Finished restoring cached yarn cache
Installing Yarn version 1.22.10
Preparing yarn@1.22.10 for immediate activation...
No yarn workspaces detected
Started restoring cached node modules
Finished restoring cached node modules
Installing npm packages using Yarn version 1.22.10
yarn install v1.22.10
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.55s.
npm packages installed using Yarn
Install dependencies script success
Starting build script
Detected 1 framework(s)
"next" at version "13.3.0"
Section completed: initializing
​
  Netlify Build                                                 
────────────────────────────────────────────────────────────────
​
❯ Version
  @netlify/build 29.9.2
​
❯ Flags
  baseRelDir: true
  buildId: 643d7a4c3a064b0008259928
  deployId: 643d7a4c3a064b000825992a
​
❯ Current directory
  /opt/build/repo
​
❯ Config file
  /opt/build/repo/netlify.toml
​
❯ Context
  deploy-preview
​
❯ Using Next.js Runtime - v4.34.0
​
  1. @netlify/plugin-nextjs (onPreBuild event)                  
────────────────────────────────────────────────────────────────
​
Next.js cache restored.
Netlify configuration property "build.environment.NEXT_PRIVATE_TARGET" value changed.
​
(@netlify/plugin-nextjs onPreBuild completed in 333ms)
​
  2. Build command from Netlify app                             
────────────────────────────────────────────────────────────────
​
$ yarn build
yarn run v1.22.10
$ BABEL_ENV=main next build
info  - Skipping linting
info  - Checking validity of types...
info  - Creating an optimized production build...
info  - Compiled successfully
info  - Collecting page data...
info  - Generating static pages (0/420)
TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:399:5)
    at new URL (node:internal/url:560:13)
    at formatEnclosure (/opt/build/repo/node_modules/feed/lib/rss2.js:153:22)
    at /opt/build/repo/node_modules/feed/lib/rss2.js:131:30
    at Array.map (<anonymous>)
    at Object.default (/opt/build/repo/node_modules/feed/lib/rss2.js:83:15)
    at Feed.rss2 (/opt/build/repo/node_modules/feed/lib/feed.js:19:56)
    at generateRssFeed (/opt/build/repo/.next/server/pages/index.js:95:95)
    at async getStaticProps (/opt/build/repo/.next/server/pages/index.js:157:5) {
  input: '%3Fmodifications%3DW3sibmFtZSI6ImF1dGhvcl9pbWFnZSIsInVybCI6Imh0dHBzOi8vcmVzLmNsb3VkaW5hcnkuY29tL3NvY2lhbC1pbWFnZS1hcHAvaW1hZ2UvdXBsb2FkL3YxNjQ4MTUyNDY5L3NvY2lhbGltYWdlLmFwcC9hdXRob3JzL2t5bGVfdWYyZjY4LmpwZyJ9LHsibmFtZSI6ImF1dGhvcl9uYW1lIiwidGV4dCI6Ikt5bGUifSx7Im5hbWUiOiJkYXRlIiwidGV4dCI6IjMwdGggSmFuIDIwMjMifSx7Im5hbWUiOiJmZWF0dXJlZF9pbWFnZSIsInVybCI6Imh0dHBzOi8vcmVzLmNsb3VkaW5hcnkuY29tL3NvY2lhbC1pbWFnZS1hcHAvaW1hZ2UvdXBsb2FkL3YxNjc1MTAyODUxL3NvY2lhbC1tZWRpYS1nNzMwNmVmYzVlXzE5MjBfam5raXcwLmpwZyJ9LHsibmFtZSI6InRpdGxlIiwidGV4dCI6IkJlc3QgU29jaWFsIE1lZGlhIFByYWN0aWNlcyBpbiAyMDIzIn1d%26sig%3Deb2d57a4a39547dc7ed498193a5ef5cdb88a4b787388b076b8418e02fdefc6d4',
  code: 'ERR_INVALID_URL'
}
info  - Generating static pages (105/420)
info  - Generating static pages (210/420)
info  - Generating static pages (315/420)
info  - Generating static pages (420/420)
info  - Finalizing page optimization...
Route (pages)                                                      Size     First Load JS
┌ ● /                                                              517 B           808 kB
├   /_app                                                          0 B             231 kB
├ ● /[lang]                                                        418 B           808 kB
├   ├ /en
├   ├ /es
├   ├ /fr
├   └ [+2 more paths]
├ ● /[lang]/[id] (934 ms)                                          443 B           808 kB
├   ├ /en/404
├   ├ /es/404
├   ├ /fr/404
├   └ [+47 more paths]
├ ● /[lang]/[id]/[subId] (931 ms)                                  448 B           808 kB
├   ├ /en/features/on-brand
├   ├ /es/features/on-brand
├   ├ /fr/features/on-brand
├   └ [+47 more paths]
├ ● /[lang]/blog (328 ms)                                          452 B           808 kB
├   ├ /en/blog
├   ├ /es/blog
├   ├ /fr/blog
├   └ [+2 more paths]
├ ● /[lang]/blog/[id] (484 ms)                                     442 B           808 kB
├   ├ /en/blog/best-social-media-practices-in-2023
├   ├ /es/blog/best-social-media-practices-in-2023
├   ├ /fr/blog/best-social-media-practices-in-2023
├   └ [+17 more paths]
├ ● /[lang]/guides                                                 452 B           808 kB
├   ├ /en/guides
├   ├ /es/guides
├   ├ /fr/guides
├   └ [+2 more paths]
├ ● /[lang]/guides/[id] (489 ms)                                   445 B           808 kB
├   ├ /en/guides/adding-help-section
├   ├ /es/guides/adding-help-section
├   ├ /fr/guides/adding-help-section
├   └ [+22 more paths]
├ ● /[lang]/help                                                   454 B           808 kB
├   ├ /en/help
├   ├ /es/help
├   ├ /fr/help
├   └ [+2 more paths]
├ ● /[lang]/help/[id] (756 ms)                                     438 B           808 kB
├   ├ /en/help/account
├   ├ /es/help/account
├   ├ /fr/help/account
├   └ [+22 more paths]
├ ● /[lang]/help/[id]/[subId] (2161 ms)                            465 B           808 kB
├   ├ /en/help/account/can-i-enabled-two-factor-authentication
├   ├ /es/help/account/can-i-enabled-two-factor-authentication
├   ├ /fr/help/account/can-i-enabled-two-factor-authentication
├   └ [+197 more paths]
├ ● /[lang]/product-updates                                        462 B           808 kB
├   ├ /en/product-updates
├   ├ /es/product-updates
├   ├ /fr/product-updates
├   └ [+2 more paths]
├ ● /[lang]/templates (2536 ms)                                    459 B           808 kB
├   ├ /en/templates (738 ms)
├   ├ /fr/templates (498 ms)
├   ├ /zh/templates (467 ms)
├   ├ /pl/templates (431 ms)
├   └ /es/templates (402 ms)
├ ● /[lang]/templates/[id] (5792 ms)                               463 B           808 kB
├   ├ /en/templates/0fe83932-4208-451d-9044-e2a241c27db1 (622 ms)
├   ├ /en/templates/e2259faf-1d33-4b24-bacb-182cdc5ea334 (593 ms)
├   ├ /fr/templates/e2259faf-1d33-4b24-bacb-182cdc5ea334 (459 ms)
├   ├ /es/templates/e2259faf-1d33-4b24-bacb-182cdc5ea334 (444 ms)
├   ├ /zh/templates/e2259faf-1d33-4b24-bacb-182cdc5ea334 (393 ms)
├   ├ /fr/templates/292b7175-3fea-4ed6-8299-b0a836f6081a (344 ms)
├   ├ /fr/templates/0fe83932-4208-451d-9044-e2a241c27db1 (340 ms)
├   └ [+8 more paths] (avg 325 ms)
├ ○ /404                                                           418 B           808 kB
├ ○ /account                                                       21.9 kB         253 kB
└ ○ /admin                                                         4.24 kB         812 kB
+ First Load JS shared by all                                      263 kB
  ├ chunks/framework-73b8966a3c579ab0.js                           45.2 kB
  ├ chunks/main-ac5ba36561402fe9.js                                27.3 kB
  ├ chunks/pages/_app-a0902861a5b7f573.js                          157 kB
  ├ chunks/webpack-d7bcb1113bf3b03a.js                             1.86 kB
  └ css/e386610ef779d3af.css                                       31.8 kB
○  (Static)  automatically rendered as static HTML (uses no initial props)
●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
$ node scripts/sitemap.xml.js
Generating a sitemap...
Page Ids: [
  '404',
  'blogPost',
  'contact',
  'error',
  'faq',
  'features',
  'home',
  'pricing',
  'solutions',
  'terms',
  'blog/best-social-media-practices-in-2023',
  'blog/create-an-image-when-a-new-row-is-added-to-a-google-sheet',
  'blog/how-to-use-signed-urls-to-generate-social-share-images-on-the-fly',
  'blog/why-i-built-social-image',
  'blog',
  'guides',
  'help',
  'helpArticle',
  'helpCategory',
  'product-updates',
  'templates',
  'solutions/ecommerce',
  'solutions/events',
  'solutions/news',
  'solutions/social-media',
  'features/on-brand',
  'features/teams',
  'features/template-editor',
  'integrations/forms',
  'integrations/rest-api',
  'integrations/signed-urls',
  'help/account',
  'help/api',
  'help/getting-started',
  'help/integrations',
  'help/template-editor',
  'help/account/can-i-enabled-two-factor-authentication',
  'help/api/can-i-get-my-image-back-in-same-request',
  'help/template-editor/can-i-remove-the-autosize-option',
  'help/account/can-my-subscription-be-paused',
  'help/account/can-you-increase-my-free-plan-quota',
  'help/account/deleting-a-project',
  'help/account/do-all-api-requests-count-against-my-plan-quota',
  'help/account/do-you-have-an-affiliate-program',
  'help/template-editor/how-can-i-add-secondary-styles-to-text',
  'help/integrations/how-can-i-delete-a-signed-url',
  'help/integrations/how-can-i-use-a-form-to-generate-images',
  'help/integrations/how-can-i-use-the-zapier-integration',
  'help/account/how-do-i-cancel-my-subscription',
  'help/account/how-do-i-change-my-billing-details',
  'help/account/how-do-i-change-my-name-on-my-account',
  'help/account/how-do-i-change-my-payment-method',
  'help/template-editor/how-do-i-change-the-font-of-my-text',
  'help/integrations/how-do-i-create-a-signed-url',
  'help/template-editor/how-do-i-create-a-template',
  'help/api/how-do-i-get-an-api-key',
  'help/integrations/how-do-i-setup-tag-mapping-with-signed-urls',
  'help/account/how-do-i-upgrade-downgrade-my-plan',
  'help/account/how-does-the-free-plan-work',
  'help/getting-started/how-does-the-image-quota-work',
  'help/api/how-long-do-images-take-to-generate',
  'help/getting-started/how-many-templates-can-i-create',
  'help/account/is-social-image-multi-lingual',
  'help/account/is-socialimage-gdpr-friendly',
  'help/getting-started/what-are-projects',
  'help/getting-started/what-can-i-use-social-image-for',
  'help/account/what-happens-if-my-payment-fails',
  'help/account/what-happens-when-my-plan-is-cancelled',
  'help/getting-started/what-is-a-template',
  'help/api/what-is-a-webhook',
  'help/getting-started/what-is-an-api',
  'help/api/where-can-i-find-the-api-documentation',
  'help/account/where-is-social-image-located',
  'help/account/which-payment-processing-provider-do-you-use',
  'help/api/why-are-my-external-images-not-loading',
  'help/getting-started/why-are-there-maximum-template-dimensions',
  'product-updates/adding-help-section',
  'product-updates/charts',
  'product-updates/google-sheets-integration',
  'product-updates/initial-update',
  'product-updates/smart-crop',
  'templates/625ae23e-a790-497a-9fec-ccf181fb60a9',
  'templates/404e5011-5ff8-4e67-8366-3e1385b8059c',
  'templates/845536c7-8bc0-45a2-b1e5-199ea065903b',
  'templates/50c4a2c0-1998-4707-a484-a12f2e57fade'
]
sitemap.xml written successfully!
Done in 180.79s.
​
(build.command completed in 3m 0.9s)
​
  3. @netlify/plugin-nextjs (onBuild event)                     
────────────────────────────────────────────────────────────────
​
Patching /opt/build/repo/node_modules/next/dist/server/base-server.js
Done
Patching /opt/build/repo/node_modules/next/dist/server/next-server.js
Done
Moving static page files to serve from CDN...
Moved 0 files
You are not using Netlify Edge Functions for image format detection. Set env var "NEXT_FORCE_EDGE_IMAGES=true" to enable.
Netlify configuration property "redirects" value changed to [
  { from: '/_next/static/*', to: '/static/:splat', status: 200 },
  {
    from: '/_next/image*',
    query: { url: ':url', w: ':width', q: ':quality' },
    to: '/_ipx/w_:width,q_:quality/:url',
    status: 301
  },
  { from: '/_ipx/*', to: '/.netlify/builders/_ipx', status: 200 },
  { from: '/cache/*', to: '/404.html', status: 404, force: true },
  { from: '/server/*', to: '/404.html', status: 404, force: true },
  { from: '/serverless/*', to: '/404.html', status: 404, force: true },
  { from: '/trace', to: '/404.html', status: 404, force: true },
  { from: '/traces', to: '/404.html', status: 404, force: true },
  {
    from: '/routes-manifest.json',
    to: '/404.html',
    status: 404,
    force: true
  },
  {
    from: '/build-manifest.json',
    to: '/404.html',
    status: 404,
    force: true
  },
  {
    from: '/prerender-manifest.json',
    to: '/404.html',
    status: 404,
    force: true
  },
  {
    from: '/react-loadable-manifest.json',
    to: '/404.html',
    status: 404,
    force: true
  },
  { from: '/BUILD_ID', to: '/404.html', status: 404, force: true },
  {
    from: '/api/*',
    to: '/.netlify/functions/___netlify-handler',
    status: 200
  },
  {
    from: '/favicon.ico',
    to: '/favicon.ico',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/no-flash.js',
    to: '/no-flash.js',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/robots.txt',
    to: '/robots.txt',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/sitemap.xml',
    to: '/sitemap.xml',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/vercel.svg',
    to: '/vercel.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/admin/config.yml',
    to: '/admin/config.yml',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/admin/index.html',
    to: '/admin/index.html',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/data/product_updates.json',
    to: '/data/product_updates.json',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/aws.svg',
    to: '/static/aws.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/googlesheets.svg',
    to: '/static/googlesheets.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/logo.svg',
    to: '/static/logo.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/pabbly_connect.png',
    to: '/static/pabbly_connect.png',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/paddle.svg',
    to: '/static/paddle.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/zapier.svg',
    to: '/static/zapier.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/Audiowide.ttf',
    to: '/static/fonts/Audiowide.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/CrimsonText.ttf',
    to: '/static/fonts/CrimsonText.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/DancingScript.ttf',
    to: '/static/fonts/DancingScript.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/IndieFlower.ttf',
    to: '/static/fonts/IndieFlower.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/Lobster.ttf',
    to: '/static/fonts/Lobster.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/Lora.ttf',
    to: '/static/fonts/Lora.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/MajorMonoDisplay.ttf',
    to: '/static/fonts/MajorMonoDisplay.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/Merriweather.ttf',
    to: '/static/fonts/Merriweather.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/Monoton.ttf',
    to: '/static/fonts/Monoton.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/Montserrat.ttf',
    to: '/static/fonts/Montserrat.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/OpenSans.ttf',
    to: '/static/fonts/OpenSans.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/Pacifico.ttf',
    to: '/static/fonts/Pacifico.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/PlayfairDisplay.ttf',
    to: '/static/fonts/PlayfairDisplay.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/Righteous.ttf',
    to: '/static/fonts/Righteous.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/RobotoMono.ttf',
    to: '/static/fonts/RobotoMono.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/RobotoSlab.ttf',
    to: '/static/fonts/RobotoSlab.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/VT323.ttf',
    to: '/static/fonts/VT323.ttf',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/quicksand-400.woff2',
    to: '/static/fonts/quicksand-400.woff2',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/quicksand-500.woff2',
    to: '/static/fonts/quicksand-500.woff2',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/quicksand-600.woff2',
    to: '/static/fonts/quicksand-600.woff2',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/fonts/quicksand-700.woff2',
    to: '/static/fonts/quicksand-700.woff2',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/locales/en/translation.json',
    to: '/static/locales/en/translation.json',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/locales/es/translation.json',
    to: '/static/locales/es/translation.json',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/locales/fr/translation.json',
    to: '/static/locales/fr/translation.json',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/static/locales/pl/translation.json',
    to: '/static/locales/pl/translation.json',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/*',
    to: '/.netlify/functions/___netlify-handler',
    status: 200,
    conditions: { Cookie: [Array] },
    force: true
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/account.json',
    to: '/.netlify/functions/___netlify-handler',
    status: 200,
    force: false
  },
  {
    from: '/account',
    to: '/.netlify/functions/___netlify-handler',
    status: 200,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/admin.json',
    to: '/.netlify/functions/___netlify-handler',
    status: 200,
    force: false
  },
  {
    from: '/admin',
    to: '/.netlify/functions/___netlify-handler',
    status: 200,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/blog.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/blog',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/blog/:id.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/blog/:id',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/guides.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/guides',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/guides/:id.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/guides/:id',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/help.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/help',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/help/:id.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/help/:id',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/help/:id/:subId.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/help/:id/:subId',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/product-updates.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/product-updates',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/templates.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/templates',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/templates/:id.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/templates/:id',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/:id.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/:id',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/_next/data/ZuAIMtR_Clv-Lt3pYyqsy/:lang/:id/:subId.json',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/:lang/:id/:subId',
    to: '/server/pages/404.html',
    status: 404,
    force: false
  },
  {
    from: '/*',
    to: '/.netlify/functions/___netlify-handler',
    status: 200
  }
].
​
(@netlify/plugin-nextjs onBuild completed in 711ms)
​
  4. Functions bundling                                         
────────────────────────────────────────────────────────────────
​
Packaging Functions from .netlify/functions-internal directory:
 - ___netlify-handler/___netlify-handler.js
 - ___netlify-odb-handler/___netlify-odb-handler.js
 - _ipx/_ipx.js
​
​
(Functions bundling completed in 3m 11.9s)
​
  5. Edge Functions bundling                                    
────────────────────────────────────────────────────────────────
​
​
(Edge Functions bundling completed in 347ms)
​
  6. @netlify/plugin-nextjs (onPostBuild event)                 
────────────────────────────────────────────────────────────────
​
Next.js cache saved.
​
(@netlify/plugin-nextjs onPostBuild completed in 467ms)
​
  7. Deploy site                                                
────────────────────────────────────────────────────────────────
​
Starting to deploy site from '.next'
Calculating files to upload
442 new files to upload
2 new functions to upload
Starting to upload
10% uploaded
20% uploaded
30% uploaded
40% uploaded
50% uploaded
60% uploaded
70% uploaded
80% uploaded
90% uploaded
100% uploaded
Section completed: deploying
Site deploy was successfully initiated
​
Starting post processing
(Deploy site completed in 13.5s)
​
  Netlify Build Complete                                        
────────────────────────────────────────────────────────────────
​
Post processing - HTML
(Netlify Build completed in 6m 29.7s)
Caching artifacts
Started saving node modules
Finished saving node modules
Started saving build plugins
Finished saving build plugins
Started saving corepack cache
Finished saving corepack cache
Started saving yarn cache
Finished saving yarn cache
Started saving pip cache
Finished saving pip cache
Started saving emacs cask dependencies
Finished saving emacs cask dependencies
Started saving maven dependencies
Finished saving maven dependencies
Started saving boot dependencies
Finished saving boot dependencies
Started saving rust rustup cache
Finished saving rust rustup cache
Started saving go dependencies
Finished saving go dependencies
Build script success
Section completed: building
Post processing - header rules
Post processing - redirect rules
Post processing done
Section completed: postprocessing
Site is live ✨
Uploading Cache of size 1.3GB
Section completed: cleanup
Finished processing build request in 8m41.662s

Checking the console in for the deployed site shows a couple of 404’s that I’d expect to “just work”…

My netlify.toml file:

[[plugins]]
  package = "@netlify/plugin-nextjs"
  
# Include all files in all functions
[functions]
  included_files = ["src/i18n/locales/**", "src/**/*", "!amplify/**",]
  
[[headers]]
  for = "data/*"
  [headers.values]
    Access-Control-Allow-Origin = "*"

P.S if there are some decent docs for this .toml file someone can point me to, that would be great too! The GitHub readme doesn’t seem to describe all of the options available to use?

I’ve also generated a zip for a few of the builds and it looks like the contents is only that of the .next output directory.

Can anyone shed some light on what might be going on here?

I’ve had to revert back to next js 12 until this issue has been sorted. Adding the fallback: “blocking” workaround ensured that pages were visible. However, any SSR pages I had were timing out. On next js 12, none of these problems exist.

Hi , sounds like this is a framework specific issue. Here’s some documentation I found as this seems to be a common problem when I google. Advanced Features: Error Handling | Next.js