NextJS Routes 404 on Successful Build

I’m working on a NextJS 13 site using next build and the usual .next folder for the build. I’m getting successful builds both on Netlify and using the netlify-cli, however the pages (other than the index) are 404ing.

Index that loads: https://deploy-preview-2--inadequatefutures.netlify.app/
Route that 404s: if | garden

Note that the build runs locally, netlify build runs locally, and netlify dev runs as expected (routing works).

I am using the most recent @netlify/plugin-nextjs.

This seems similar to a few other issues reported (Problems deploying Next.js site with Yarn Workspaces monorepo).

Site: https://deploy-preview-2--inadequatefutures.netlify.app/

Most Recent Build

4:21:51 PM: build-image version: 596993885fcc8df0dd6d507c57c5c9cb7c3a8576 (focal)
4:21:51 PM: buildbot version: 163fe70070e26a02d64141bf435d02320d25b8c1
4:21:51 PM: Fetching cached dependencies
4:21:51 PM: Starting to download cache of 337.1MB
4:21:53 PM: Finished downloading cache in 1.935s
4:21:53 PM: Starting to extract cache
4:21:54 PM: Finished extracting cache in 1.587s
4:21:54 PM: Finished fetching cache in 3.585s
4:21:54 PM: Starting to prepare the repo for build
4:21:55 PM: Preparing Git Reference pull/2/head
4:21:55 PM: Parsing package.json dependencies
4:21:57 PM: Starting to install dependencies
4:21:57 PM: Python version set to 3.8
4:21:57 PM: Attempting Ruby version 2.7.2, read from environment
4:21:57 PM: Using Ruby version 2.7.2
4:21:58 PM: Started restoring cached go cache
4:21:58 PM: Finished restoring cached go cache
4:21:58 PM: Installing Go version 1.19.5 (requested 1.19.5)
4:22:04 PM: go version go1.19.5 linux/amd64
4:22:04 PM: Using PHP version 8.0
4:22:05 PM: Started restoring cached Node.js version
4:22:05 PM: Finished restoring cached Node.js version
4:22:06 PM: v16.13.0 is already installed.
4:22:06 PM: Now using node v16.13.0 (npm v8.1.0)
4:22:06 PM: Enabling Node.js Corepack
4:22:06 PM: Started restoring cached build plugins
4:22:06 PM: Finished restoring cached build plugins
4:22:06 PM: Started restoring cached corepack dependencies
4:22:06 PM: Finished restoring cached corepack dependencies
4:22:06 PM: Started restoring cached yarn cache
4:22:06 PM: Finished restoring cached yarn cache
4:22:06 PM: No yarn workspaces detected
4:22:06 PM: Started restoring cached node modules
4:22:06 PM: Finished restoring cached node modules
4:22:07 PM: Installing npm packages using Yarn version 3.1.1
4:22:07 PM: ➤ YN0000: ┌ Resolution step
4:22:07 PM: ➤ YN0002: │ site@workspace:. doesn't provide eslint-plugin-react-hooks (p07ff4), requested by eslint-config-airbnb➤ YN0060: │ site@workspace:. provides react (paa00d) with version 18.2.0, which doesn't satisfy what next-mdx-remote and some of its descendants request➤ YN0060: │ site@workspace:. provides react-dom (pf70ad) with version 18.2.0, which doesn't satisfy what next-mdx-remote requests➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
4:22:07 PM: ➤ YN0000: └ Completed
4:22:08 PM: ➤ YN0000: ┌ Fetch step
4:22:08 PM: ➤ YN0013: │ 676 packages were already cached
4:22:08 PM: ➤ YN0000: └ Completed in 0s 362ms
4:22:08 PM: ➤ YN0000: ┌ Link step
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-android-64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-android-arm64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-darwin-64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-darwin-arm64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-freebsd-64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-freebsd-arm64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-linux-32@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-linux-arm64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-linux-arm@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-linux-mips64le@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-linux-ppc64le@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-linux-riscv64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-linux-s390x@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-netbsd-64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-openbsd-64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-sunos-64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-windows-32@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-windows-64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ @netlify/esbuild-windows-arm64@npm:0.14.39 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:08 PM: ➤ YN0076: │ fsevents@patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>::version=2.3.2&hash=18f3a7 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:09 PM: ➤ YN0076: │ @next/swc-darwin-arm64@npm:13.3.0 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:09 PM: ➤ YN0076: │ @next/swc-darwin-x64@npm:13.3.0 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:09 PM: ➤ YN0076: │ @next/swc-linux-arm64-gnu@npm:13.3.0 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:09 PM: ➤ YN0076: │ @next/swc-linux-arm64-musl@npm:13.3.0 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:09 PM: ➤ YN0076: │ @next/swc-win32-arm64-msvc@npm:13.3.0 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:09 PM: ➤ YN0076: │ @next/swc-win32-ia32-msvc@npm:13.3.0 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:09 PM: ➤ YN0076: │ @next/swc-win32-x64-msvc@npm:13.3.0 The linux-x64 architecture is incompatible with this module, link skipped.
4:22:09 PM: ➤ YN0007: │ @netlify/esbuild@npm:0.14.39 must be built because it never has been before or the last one failed
4:22:09 PM: ➤ YN0007: │ esbuild@npm:0.12.15 must be built because it never has been before or the last one failed
4:22:09 PM: ➤ YN0007: │ sharp@npm:0.30.7 must be built because it never has been before or the last one failed
4:22:09 PM: ➤ YN0007: │ core-js-pure@npm:3.13.1 must be built because it never has been before or the last one failed
4:22:10 PM: ➤ YN0000: │ sharp@npm:0.30.7 STDOUT sharp: Using existing vendored libvips v8.12.2
4:22:11 PM: ➤ YN0000: └ Completed in 2s 774ms
4:22:11 PM: ➤ YN0000: Done with warnings in 3s 380ms
4:22:11 PM: npm packages installed using Yarn
4:22:11 PM: Install dependencies script success
4:22:11 PM: Starting build script
4:22:12 PM: Detected 1 framework(s)
4:22:12 PM: "next" at version "13.3.0"
4:22:12 PM: Section completed: initializing
4:22:13 PM: ​
4:22:13 PM:   Netlify Build                                                 
4:22:13 PM: ────────────────────────────────────────────────────────────────
4:22:13 PM: ​
4:22:13 PM: ❯ Version
4:22:13 PM:   @netlify/build 29.9.0
4:22:13 PM: ​
4:22:13 PM: ❯ Flags
4:22:13 PM:   baseRelDir: true
4:22:13 PM:   buildId: 6431daea9812c5000837185b
4:22:13 PM:   deployId: 6431daea9812c5000837185d
4:22:13 PM: ​
4:22:13 PM: ❯ Current directory
4:22:13 PM:   /opt/build/repo
4:22:13 PM: ​
4:22:13 PM: ❯ Config file
4:22:13 PM:   /opt/build/repo/netlify.toml
4:22:13 PM: ​
4:22:13 PM: ❯ Context
4:22:13 PM:   deploy-preview
4:22:13 PM: ​
4:22:13 PM: ❯ Using Next.js Runtime - v4.33.0
4:22:15 PM: ​
4:22:15 PM:   1. @netlify/plugin-nextjs (onPreBuild event)                  
4:22:15 PM: ────────────────────────────────────────────────────────────────
4:22:15 PM: ​
4:22:15 PM: Next.js cache restored.
4:22:15 PM: Netlify configuration property "build.environment.NEXT_PRIVATE_TARGET" value changed.
4:22:15 PM: ​
4:22:15 PM: (@netlify/plugin-nextjs onPreBuild completed in 59ms)
4:22:15 PM: ​
4:22:15 PM:   2. build.command from netlify.toml                            
4:22:15 PM: ────────────────────────────────────────────────────────────────
4:22:15 PM: ​
4:22:15 PM: $ yarn build
4:22:16 PM: warn  - Detected next.config.js, no exported configuration found. https://nextjs.org/docs/messages/empty-configuration
4:22:16 PM: info  - Linting and checking validity of types...
4:22:16 PM: warn  - The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/basic-features/eslint#migrating-existing-config
4:22:17 PM: info  - Creating an optimized production build...
4:22:21 PM: info  - Compiled successfully
4:22:21 PM: info  - Collecting page data...
4:22:21 PM: info  - Generating static pages (0/77)
4:22:24 PM: info  - Generating static pages (19/77)
4:22:24 PM: Warning: data for page "/[...slug]" (path "/garden/04-dynamic-routes-nextjs") is 130 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance.
4:22:24 PM: See more info here: https://nextjs.org/docs/messages/large-page-data
4:22:26 PM: info  - Generating static pages (38/77)
4:22:29 PM: info  - Generating static pages (57/77)
4:22:44 PM: info  - Generating static pages (77/77)
4:22:44 PM: info  - Finalizing page optimization...
4:22:44 PM: Route (pages)                                    Size     First Load JS
4:22:44 PM: ┌ ● / (1777 ms)                                  3.23 kB        87.4 kB
4:22:44 PM: ├   /_app                                        0 B            84.2 kB
4:22:44 PM: ├ ● /[...slug] (4508 ms)                         3.68 kB        87.9 kB
4:22:44 PM: ├   ├ /garden/00-if-relaunch (886 ms)
4:22:44 PM: ├   ├ /garden/01-programmatic-menu (519 ms)
4:22:44 PM: ├   ├ /garden/04-dynamic-routes-nextjs (432 ms)
4:22:44 PM: ├   ├ /garden/02-dark-mode-with-emotion-js
4:22:44 PM: ├   ├ /garden/03-styled-system-variants
4:22:44 PM: ├   ├ /garden/00-garden-plugin
4:22:44 PM: ├   ├ /garden/00-gardening-writing
4:22:44 PM: ├   └ [+20 more paths]
4:22:44 PM: ├ ○ /404                                         182 B          84.4 kB
4:22:44 PM: ├ ● /about (1281 ms)                             983 B          90.1 kB
4:22:44 PM: ├ ● /garden                                      1.33 kB        85.5 kB
4:22:44 PM: ├ ● /tags/[tag] (22457 ms)                       991 B          85.2 kB
4:22:44 PM: ├   ├ /tags/sustainability (1131 ms)
4:22:44 PM: ├   ├ /tags/insurgent (1074 ms)
4:22:44 PM: ├   ├ /tags/copyleft (1070 ms)
4:22:44 PM: ├   ├ /tags/javascript (1019 ms)
4:22:44 PM: ├   ├ /tags/open-source (1015 ms)
4:22:44 PM: ├   ├ /tags/frontend (1009 ms)
4:22:44 PM: ├   ├ /tags/navigation (940 ms)
4:22:44 PM: ├   └ [+37 more paths] (avg 411 ms)
4:22:44 PM: └ ● /work (659 ms)                               1.56 kB        90.7 kB
4:22:44 PM: + First Load JS shared by all                    84.2 kB
4:22:44 PM:   ├ chunks/framework-2c79e2a64abdb08b.js         45.2 kB
4:22:44 PM:   ├ chunks/main-164f91e3b1a225f8.js              27.1 kB
4:22:44 PM:   ├ chunks/pages/_app-085935795d345719.js        11.1 kB
4:22:44 PM:   └ chunks/webpack-8fa1640cc84ba8fe.js           750 B
4:22:44 PM: ○  (Static)  automatically rendered as static HTML (uses no initial props)
4:22:44 PM: ●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
4:22:44 PM: ​
4:22:44 PM: (build.command completed in 29.3s)
4:22:44 PM: ​
4:22:44 PM:   3. @netlify/plugin-nextjs (onBuild event)                     
4:22:44 PM: ────────────────────────────────────────────────────────────────
4:22:44 PM: ​
4:22:44 PM: Patching /opt/build/repo/node_modules/next/dist/server/base-server.js
4:22:44 PM: Done
4:22:44 PM: Patching /opt/build/repo/node_modules/next/dist/server/next-server.js
4:22:44 PM: Done
4:22:44 PM: Moving static page files to serve from CDN...
4:22:44 PM: Moved 0 files
4:22:44 PM: You are not using Netlify Edge Functions for image format detection. Set env var "NEXT_FORCE_EDGE_IMAGES=true" to enable.
4:22:44 PM: Netlify configuration property "redirects" value changed to [
4:22:44 PM:   { from: '/_next/static/*', to: '/static/:splat', status: 200 },
4:22:44 PM:   {
4:22:44 PM:     from: '/_next/image*',
4:22:44 PM:     query: { url: ':url', w: ':width', q: ':quality' },
4:22:44 PM:     to: '/_ipx/w_:width,q_:quality/:url',
4:22:44 PM:     status: 301
4:22:44 PM:   },
4:22:44 PM:   { from: '/_ipx/*', to: '/.netlify/builders/_ipx', status: 200 },
4:22:44 PM:   { from: '/cache/*', to: '/404.html', status: 404, force: true },
4:22:44 PM:   { from: '/server/*', to: '/404.html', status: 404, force: true },
4:22:44 PM:   { from: '/serverless/*', to: '/404.html', status: 404, force: true },
4:22:44 PM:   { from: '/trace', to: '/404.html', status: 404, force: true },
4:22:44 PM:   { from: '/traces', to: '/404.html', status: 404, force: true },
4:22:44 PM:   {
4:22:44 PM:     from: '/routes-manifest.json',
4:22:44 PM:     to: '/404.html',
4:22:44 PM:     status: 404,
4:22:44 PM:     force: true
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/build-manifest.json',
4:22:44 PM:     to: '/404.html',
4:22:44 PM:     status: 404,
4:22:44 PM:     force: true
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/prerender-manifest.json',
4:22:44 PM:     to: '/404.html',
4:22:44 PM:     status: 404,
4:22:44 PM:     force: true
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/react-loadable-manifest.json',
4:22:44 PM:     to: '/404.html',
4:22:44 PM:     status: 404,
4:22:44 PM:     force: true
4:22:44 PM:   },
4:22:44 PM:   { from: '/BUILD_ID', to: '/404.html', status: 404, force: true },
4:22:44 PM:   {
4:22:44 PM:     from: '/api/*',
4:22:44 PM:     to: '/.netlify/functions/___netlify-handler',
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/favicon.ico',
4:22:44 PM:     to: '/favicon.ico',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/favicon.ico',
4:22:44 PM:     to: '/images/favicon.ico',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/icon.png',
4:22:44 PM:     to: '/images/icon.png',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/profile.jpg',
4:22:44 PM:     to: '/images/profile.jpg',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/portfolio/agency.png',
4:22:44 PM:     to: '/images/portfolio/agency.png',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/portfolio/ed.png',
4:22:44 PM:     to: '/images/portfolio/ed.png',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/portfolio/garden.jpg',
4:22:44 PM:     to: '/images/portfolio/garden.jpg',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/portfolio/graveflex.jpg',
4:22:44 PM:     to: '/images/portfolio/graveflex.jpg',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/portfolio/header.png',
4:22:44 PM:     to: '/images/portfolio/header.png',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/portfolio/if.jpg',
4:22:44 PM:     to: '/images/portfolio/if.jpg',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/portfolio/if.png',
4:22:44 PM:     to: '/images/portfolio/if.png',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/portfolio/plume.jpg',
4:22:44 PM:     to: '/images/portfolio/plume.jpg',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/portfolio/relay.png',
4:22:44 PM:     to: '/images/portfolio/relay.png',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/portfolio/sf.png',
4:22:44 PM:     to: '/images/portfolio/sf.png',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/images/portfolio/spotify-dashboard.jpg',
4:22:44 PM:     to: '/images/portfolio/spotify-dashboard.jpg',
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     status: 200
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/*',
4:22:44 PM:     to: '/.netlify/functions/___netlify-handler',
4:22:44 PM:     status: 200,
4:22:44 PM:     conditions: { Cookie: [Array] },
4:22:44 PM:     force: true
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/_next/data/KpYh6F2B4cTAOHJaJq4ON/tags/:tag.json',
4:22:44 PM:     to: '/server/pages/404.html',
4:22:44 PM:     status: 404,
4:22:44 PM:     force: false
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/tags/:tag',
4:22:44 PM:     to: '/server/pages/404.html',
4:22:44 PM:     status: 404,
4:22:44 PM:     force: false
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/_next/data/KpYh6F2B4cTAOHJaJq4ON/:slug/*',
4:22:44 PM:     to: '/server/pages/404.html',
4:22:44 PM:     status: 404,
4:22:44 PM:     force: false
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/:slug/*',
4:22:44 PM:     to: '/server/pages/404.html',
4:22:44 PM:     status: 404,
4:22:44 PM:     force: false
4:22:44 PM:   },
4:22:44 PM:   {
4:22:44 PM:     from: '/*',
4:22:44 PM:     to: '/.netlify/functions/___netlify-handler',
4:22:44 PM:     status: 200
4:22:44 PM:   }
4:22:44 PM: ].
4:22:44 PM: ​
4:22:44 PM: (@netlify/plugin-nextjs onBuild completed in 144ms)
4:22:44 PM: ​
4:22:44 PM:   4. Functions bundling                                         
4:22:44 PM: ────────────────────────────────────────────────────────────────
4:22:44 PM: ​
4:22:44 PM: Packaging Functions from .netlify/functions-internal directory:
4:22:44 PM:  - ___netlify-handler/___netlify-handler.js
4:22:44 PM:  - ___netlify-odb-handler/___netlify-odb-handler.js
4:22:44 PM:  - _ipx/_ipx.js
4:22:44 PM: ​
4:23:17 PM: ​
4:23:17 PM: (Functions bundling completed in 32.7s)
4:23:17 PM: ​
4:23:17 PM:   5. Edge Functions bundling                                    
4:23:17 PM: ────────────────────────────────────────────────────────────────
4:23:17 PM: ​
4:23:18 PM: ​
4:23:18 PM: (Edge Functions bundling completed in 334ms)
4:23:18 PM: ​
4:23:18 PM:   6. @netlify/plugin-nextjs (onPostBuild event)                 
4:23:18 PM: ────────────────────────────────────────────────────────────────
4:23:18 PM: ​
4:23:18 PM: Next.js cache saved.
4:23:18 PM: ​
4:23:18 PM: (@netlify/plugin-nextjs onPostBuild completed in 67ms)
4:23:18 PM: ​
4:23:18 PM:   7. Deploy site                                                
4:23:18 PM: ────────────────────────────────────────────────────────────────
4:23:18 PM: ​
4:23:18 PM: Starting to deploy site from '.next'
4:23:18 PM: Calculating files to upload
4:23:18 PM: 92 new files to upload
4:23:18 PM: 3 new functions to upload
4:23:26 PM: Section completed: deploying
4:23:26 PM: Site deploy was successfully initiated
4:23:26 PM: ​
4:23:26 PM: (Deploy site completed in 8.3s)
4:23:26 PM: Starting post processing
4:23:26 PM: ​
4:23:26 PM:   Netlify Build Complete                                        
4:23:26 PM: ────────────────────────────────────────────────────────────────
4:23:26 PM: Post processing - HTML
4:23:26 PM: ​
4:23:26 PM: (Netlify Build completed in 1m 12.7s)
4:23:26 PM: Caching artifacts
4:23:26 PM: Started saving node modules
4:23:26 PM: Finished saving node modules
4:23:26 PM: Started saving build plugins
4:23:26 PM: Finished saving build plugins
4:23:26 PM: Started saving corepack cache
4:23:26 PM: Finished saving corepack cache
4:23:26 PM: Started saving yarn cache
4:23:27 PM: Finished saving yarn cache
4:23:27 PM: Started saving pip cache
4:23:27 PM: Finished saving pip cache
4:23:27 PM: Started saving emacs cask dependencies
4:23:27 PM: Finished saving emacs cask dependencies
4:23:27 PM: Started saving maven dependencies
4:23:27 PM: Finished saving maven dependencies
4:23:27 PM: Started saving boot dependencies
4:23:27 PM: Finished saving boot dependencies
4:23:27 PM: Started saving rust rustup cache
4:23:27 PM: Finished saving rust rustup cache
4:23:27 PM: Started saving go dependencies
4:23:27 PM: Finished saving go dependencies
4:23:29 PM: Build script success
4:23:29 PM: Section completed: building
4:23:30 PM: Post processing - header rules
4:23:30 PM: Post processing - redirect rules
4:23:30 PM: Post processing done
4:23:30 PM: Section completed: postprocessing
4:23:31 PM: Site is live ✨
4:23:38 PM: Uploading Cache of size 337.3MB
4:23:40 PM: Section completed: cleanup
4:23:40 PM: Finished processing build request in 1m49.212s

Hi @inadeqtfuturs,

This is because of fallback: false here: inadequatefutures.com/[...slug].js at main · inadeqtfuturs/inadequatefutures.com · GitHub

The Next.js Runtime was updated in the past few months to fix a bug and has now created this new bug (already known and potential solution being investigated). You would have to use fallback: 'blocking', at least for now.

That seems to be the fix.

Is that in the docs somewhere that I missed?

As mentioned, it’s a bug (not a limitation), so it’s not documented.

Fallback: 'blocking' seems to work for routes that use getStaticPaths but how can we fix routes that use only getStaticProps? Those are also broken. Repo: GitHub - alianza/portfolio-lea: Journalist Portfolio website for Léa Shamaa!

Can we also track this issue somewhere? I created an issue on the github repo: [Bug]: 404 page for static routes using getStatic... · Issue #2043 · netlify/next-runtime · GitHub (And referred back to this forum thread as well)

You can continue to monitor this thread for important updates. Regarding the issue, we will discuss it with the devs to confirm about the behaviour.

1 Like

I’ve also been banging my head against a brick wall with this issue. Where is the best place to track this issue considering this thread has been marked as “solved”. Cheers

This thread would be the best place. We will update this thread accordingly and you’ll get notified when we do.

2 Likes

@hrishikesh are there any updates on this known bug?

Based on the Github issue that @alianza had created, it seems to have been fixed in a recent PR.

At least on my end, it looks like the fix has solved the bug for my static pages.

1 Like

thanks for letting us know.