404 on all pages of a Next js application with "app router" setup

Hi,

I have a nextjs app which was working fine with the “pages router” setup. I’ve now migrated it to use the “app router” and after deploying it I get 404 on all pages. It builds successfully on netlify.
Site name “nftalento”
Netlify site url https://nftalento.netlify.app/
Custom domain url https://app.nftalento.com/
Builds locally and runs with yarn start
Next version: 13.4.4

Something weird that I see is that the routes have 0 bytes

next config

const config = {
  experimental: {
    appDir: true
  },
  eslint: {
    ignoreDuringBuilds: true,
  },
  typescript: {
    ignoreBuildErrors: true,
  },
  reactStrictMode: true,
  i18n: {
    locales: ["en"],
    defaultLocale: "en",
  },
};

middleware.ts

import { authMiddleware } from "@clerk/nextjs";

export default authMiddleware({
  publicRoutes: [
    "/",
    "/creation(.*)",
    "/channel(.*)",

    // let the api authentication be handled by trpc middleware
    "/api(.*)",
    "/trpc(.*)",
  ],
});

export const config = {
  matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"],
};

Full build log (had to remove some parts which shouldn’t be relevant due to char limits):

11:40:51 AM: Netlify Build                                                 
11:40:51 AM: ────────────────────────────────────────────────────────────────
11:40:51 AM: ​
11:40:51 AM: ❯ Version
11:40:51 AM:   @netlify/build 29.11.6
11:40:51 AM: ​
11:40:51 AM: ❯ Flags
11:40:51 AM:   baseRelDir: true
11:40:51 AM:   buildId: 64799c9ee3d8686cdca41f4d
11:40:51 AM:   deployId: 64799c9ee3d8686cdca41f4f
11:40:51 AM: ​
11:40:51 AM: ❯ Current directory
11:40:51 AM:   /opt/build/repo/webapp
11:40:51 AM: ​
11:40:51 AM: ❯ Config file
11:40:51 AM:   No config file was defined: using default values.
11:40:51 AM: ​
11:40:51 AM: ❯ Context
11:40:51 AM:   production
11:40:51 AM: ​
11:40:51 AM: ❯ Installing plugins
11:40:51 AM:    - @netlify/plugin-nextjs@4.37.4
11:40:51 AM:    - @netlify/plugin-lighthouse@4.1.1
11:41:12 AM: ​
11:41:12 AM: ❯ Using Next.js Runtime - v4.37.4
11:41:12 AM: ​
11:41:12 AM: ❯ Loading plugins
11:41:12 AM:    - @netlify/plugin-lighthouse@4.1.1 from Netlify app
11:41:14 AM: ​
11:41:14 AM: @netlify/plugin-nextjs (onPreBuild event)                     
11:41:14 AM: ────────────────────────────────────────────────────────────────
11:41:14 AM: ​
11:41:14 AM: No Next.js cache to restore.
11:41:14 AM: Netlify configuration property "build.environment.NEXT_PRIVATE_TARGET" value changed.
11:41:14 AM: ​
11:41:14 AM: (@netlify/plugin-nextjs onPreBuild completed in 19ms)
11:41:14 AM: ​
11:41:14 AM: Build command from Netlify app                                
11:41:14 AM: ────────────────────────────────────────────────────────────────
11:41:14 AM: ​
11:41:14 AM: $ npm run build
11:41:14 AM: > nftalento@0.1.0 build
11:41:14 AM: > next build
11:41:15 AM: - warn No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
11:41:15 AM: - info Creating an optimized production build...
11:44:09 AM: warn - The utility `w-[calc(100%-theme('spacing[some_key][1.5]'))]` contains an invalid theme value and was not generated.
11:44:18 AM: (node:4083) [DEP_WEBPACK_MODULE_UPDATE_HASH] DeprecationWarning: Module.updateHash: Use new ChunkGraph API
11:44:18 AM: (Use `node --trace-deprecation ...` to show where the warning was created)
11:44:30 AM: - warn Compiled with warnings
11:44:30 AM: ./node_modules/@walletconnect/keyvaluestorage/dist/cjs/node-js/db.js
11:44:30 AM: Module not found: Can't resolve 'lokijs' in '/opt/build/repo/webapp/node_modules/@walletconnect/keyvaluestorage/dist/cjs/node-js'
11:44:30 AM: Import trace for requested module:
11:44:30 AM: ./node_modules/@walletconnect/keyvaluestorage/dist/cjs/node-js/db.js
11:44:30 AM: ./node_modules/@walletconnect/keyvaluestorage/dist/cjs/node-js/index.js
11:44:30 AM: ./node_modules/@walletconnect/keyvaluestorage/dist/cjs/index.js
11:44:30 AM: ./node_modules/@thirdweb-dev/wallets/node_modules/@walletconnect/core/dist/index.cjs.js
11:44:30 AM: ./node_modules/@thirdweb-dev/wallets/dist/thirdweb-dev-wallets.esm.js
11:44:30 AM: ./node_modules/@thirdweb-dev/react/dist/thirdweb-dev-react.esm.js
11:44:30 AM: ./src/components/Providers/ClientProviders.tsx
11:44:30 AM: ./node_modules/node-fetch/lib/index.js
11:44:30 AM: Module not found: Can't resolve 'encoding' in '/opt/build/repo/webapp/node_modules/node-fetch/lib'
11:44:30 AM: Import trace for requested module:
11:44:30 AM: ./node_modules/node-fetch/lib/index.js
11:44:30 AM: ./node_modules/cross-fetch/dist/node-ponyfill.js
11:44:30 AM: ./node_modules/@thirdweb-dev/sdk/dist/thirdweb-dev-sdk.esm.js
11:44:30 AM: ./node_modules/@thirdweb-dev/react-core/dist/thirdweb-dev-react-core.esm.js
11:44:30 AM: ./node_modules/@thirdweb-dev/react/dist/thirdweb-dev-react.esm.js
11:44:30 AM: ./src/components/Providers/ClientProviders.tsx
11:44:30 AM: ./node_modules/pino/lib/tools.js
11:44:30 AM: Module not found: Can't resolve 'pino-pretty' in '/opt/build/repo/webapp/node_modules/pino/lib'
11:44:30 AM: Import trace for requested module:
11:44:30 AM: ./node_modules/pino/lib/tools.js
11:44:30 AM: ./node_modules/pino/pino.js
11:44:30 AM: ./node_modules/@walletconnect/logger/dist/cjs/index.js
11:44:30 AM: ./node_modules/@thirdweb-dev/wallets/node_modules/@walletconnect/core/dist/index.cjs.js
11:44:30 AM: ./node_modules/@thirdweb-dev/wallets/dist/thirdweb-dev-wallets.esm.js
11:44:30 AM: ./node_modules/@thirdweb-dev/react/dist/thirdweb-dev-react.esm.js
11:44:30 AM: ./src/components/Providers/ClientProviders.tsx
11:44:30 AM: ./node_modules/@clerk/shared/dist/esm/index.js
11:44:30 AM: A Node.js API is used (MessageEvent at line: 376) which is not supported in the Edge Runtime.
11:44:30 AM: Learn more: https://nextjs.org/docs/api-reference/edge-runtime
11:44:30 AM: Import trace for requested module:
11:44:30 AM: ./node_modules/@clerk/shared/dist/esm/index.js
11:44:30 AM: ./node_modules/@clerk/clerk-react/dist/hooks/useOrganization.js
11:44:30 AM: ./node_modules/@clerk/clerk-react/dist/hooks/index.js
11:44:30 AM: ./node_modules/@clerk/clerk-react/dist/index.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/client-boundary/controlComponents.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/index.js
11:44:30 AM: ./node_modules/scheduler/cjs/scheduler.production.min.js
11:44:30 AM: A Node.js API is used (setImmediate at line: 51) which is not supported in the Edge Runtime.
11:44:30 AM: Learn more: https://nextjs.org/docs/api-reference/edge-runtime
11:44:30 AM: Import trace for requested module:
11:44:30 AM: ./node_modules/scheduler/cjs/scheduler.production.min.js
11:44:30 AM: ./node_modules/scheduler/index.js
11:44:30 AM: ./node_modules/react-dom/cjs/react-dom.production.min.js
11:44:30 AM: ./node_modules/react-dom/index.js
11:44:30 AM: ./node_modules/next/dist/esm/client/script.js
11:44:30 AM: ./node_modules/next/dist/esm/shared/lib/router/router.js
11:44:30 AM: ./node_modules/next/dist/esm/client/router.js
11:44:30 AM: ./node_modules/next/router.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/pages/ClerkProvider.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/components.client.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/index.js
11:44:30 AM: ./node_modules/scheduler/cjs/scheduler.production.min.js
11:44:30 AM: A Node.js API is used (setImmediate at line: 51) which is not supported in the Edge Runtime.
11:44:30 AM: Learn more: https://nextjs.org/docs/api-reference/edge-runtime
11:44:30 AM: Import trace for requested module:
11:44:30 AM: ./node_modules/scheduler/cjs/scheduler.production.min.js
11:44:30 AM: ./node_modules/scheduler/index.js
11:44:30 AM: ./node_modules/react-dom/cjs/react-dom.production.min.js
11:44:30 AM: ./node_modules/react-dom/index.js
11:44:30 AM: ./node_modules/next/dist/esm/client/script.js
11:44:30 AM: ./node_modules/next/dist/esm/shared/lib/router/router.js
11:44:30 AM: ./node_modules/next/dist/esm/client/router.js
11:44:30 AM: ./node_modules/next/router.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/pages/ClerkProvider.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/components.client.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/index.js
11:44:30 AM: ./node_modules/scheduler/cjs/scheduler.production.min.js
11:44:30 AM: A Node.js API is used (MessageChannel at line: 120) which is not supported in the Edge Runtime.
11:44:30 AM: Learn more: https://nextjs.org/docs/api-reference/edge-runtime
11:44:30 AM: Import trace for requested module:
11:44:30 AM: ./node_modules/scheduler/cjs/scheduler.production.min.js
11:44:30 AM: ./node_modules/scheduler/index.js
11:44:30 AM: ./node_modules/react-dom/cjs/react-dom.production.min.js
11:44:30 AM: ./node_modules/react-dom/index.js
11:44:30 AM: ./node_modules/next/dist/esm/client/script.js
11:44:30 AM: ./node_modules/next/dist/esm/shared/lib/router/router.js
11:44:30 AM: ./node_modules/next/dist/esm/client/router.js
11:44:30 AM: ./node_modules/next/router.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/pages/ClerkProvider.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/components.client.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/index.js
11:44:30 AM: ./node_modules/scheduler/cjs/scheduler.production.min.js
11:44:30 AM: A Node.js API is used (MessageChannel at line: 121) which is not supported in the Edge Runtime.
11:44:30 AM: Learn more: https://nextjs.org/docs/api-reference/edge-runtime
11:44:30 AM: Import trace for requested module:
11:44:30 AM: ./node_modules/scheduler/cjs/scheduler.production.min.js
11:44:30 AM: ./node_modules/scheduler/index.js
11:44:30 AM: ./node_modules/react-dom/cjs/react-dom.production.min.js
11:44:30 AM: ./node_modules/react-dom/index.js
11:44:30 AM: ./node_modules/next/dist/esm/client/script.js
11:44:30 AM: ./node_modules/next/dist/esm/shared/lib/router/router.js
11:44:30 AM: ./node_modules/next/dist/esm/client/router.js
11:44:30 AM: ./node_modules/next/router.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/pages/ClerkProvider.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/components.client.js
11:44:30 AM: ./node_modules/@clerk/nextjs/dist/esm/index.js
11:44:30 AM: - info Skipping validation of types
11:44:30 AM: - info Skipping linting
11:44:30 AM: - info Collecting page data...
11:44:47 AM: - info Generating static pages (0/20)
11:44:47 AM: - info Generating static pages (5/20)
11:44:48 AM: - info Generating static pages (10/20)
11:44:48 AM: - info Generating static pages (15/20)
11:44:48 AM: - info Generating static pages (20/20)
11:44:48 AM: - info Finalizing page optimization...
11:44:48 AM: Route (app)                                Size     First Load JS
11:44:48 AM: ┌ λ /                                      0 B                0 B
11:44:48 AM: ├ λ /advertise                             0 B                0 B
11:44:48 AM: ├ λ /api/media-converted-event             0 B                0 B
11:44:48 AM: ├ λ /api/thumbnails-generated-event        0 B                0 B
11:44:48 AM: ├ λ /auth/login/[[...pathname]]            0 B                0 B
11:44:48 AM: ├ λ /auth/register/[[...pathname]]         0 B                0 B
11:44:48 AM: ├ λ /channel/[channelHandle]               0 B                0 B
11:44:48 AM: ├ λ /creation/[assetSlug]                  0 B                0 B
11:44:48 AM: ├ λ /creations/following                   0 B                0 B
11:44:48 AM: ├ λ /creations/most-recent                 0 B                0 B
11:44:48 AM: ├ λ /creations/top-rated                   0 B                0 B
11:44:48 AM: ├ λ /creations/trending                    0 B                0 B
11:44:48 AM: ├ λ /creations/with-highest-followers      0 B                0 B
11:44:48 AM: ├ λ /legal/privacy-policy                  0 B                0 B
11:44:48 AM: ├ λ /legal/terms                           0 B                0 B
11:44:48 AM: ├ λ /marketplace                           0 B                0 B
11:44:48 AM: ├ λ /me/account                            0 B                0 B
11:44:48 AM: ├ λ /me/channel/create                     0 B                0 B
11:44:48 AM: ├ λ /me/channel/update                     0 B                0 B
11:44:48 AM: └ λ /me/creation/upload                    0 B                0 B
11:44:48 AM: + First Load JS shared by all              78.4 kB
11:44:48 AM:   ├ chunks/2443530c-e55d56c9484a8e3d.js    50.5 kB
11:44:48 AM:   ├ chunks/6488-caa2380d1b477330.js        24.9 kB
11:44:48 AM:   ├ chunks/main-app-26125602b6d3e1b3.js    222 B
11:44:48 AM:   └ chunks/webpack-cbaebfa023cbfa4d.js     2.8 kB
11:44:48 AM: Route (pages)                              Size     First Load JS
11:44:48 AM: ┌ ○ /404                                   184 B          76.9 kB
11:44:48 AM: ├ λ /api/scripts/import-countries          0 B            76.7 kB
11:44:48 AM: ├ λ /api/scripts/migrate-thumbnails        0 B            76.7 kB
11:44:48 AM: └ λ /api/trpc/[trpc]                       0 B            76.7 kB
11:44:48 AM: + First Load JS shared by all              76.7 kB
11:44:48 AM:   ├ chunks/framework-4498e84bb0ba1830.js   45.1 kB
11:44:48 AM:   ├ chunks/main-6f6c0348220b5dc1.js        28.7 kB
11:44:48 AM:   ├ chunks/pages/_app-ed2c3d0606c6e9b2.js  200 B
11:44:48 AM:   └ chunks/webpack-cbaebfa023cbfa4d.js     2.8 kB
11:44:48 AM: ƒ Middleware                               175 kB
11:44:48 AM: λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
11:44:48 AM: ○  (Static)  automatically rendered as static HTML (uses no initial props)
11:44:49 AM: ​
11:44:49 AM: (build.command completed in 3m 34.3s)
11:44:49 AM: ​
11:44:49 AM: @netlify/plugin-nextjs (onBuild event)                        
11:44:49 AM: ────────────────────────────────────────────────────────────────
11:44:49 AM: ​
11:44:49 AM: Patching /opt/build/repo/webapp/node_modules/next/dist/server/base-server.js
11:44:49 AM: Done
11:44:49 AM: Patching /opt/build/repo/webapp/node_modules/next/dist/server/next-server.js
11:44:49 AM: Done
11:44:49 AM: Moving static page files to serve from CDN...
11:44:49 AM: Moved 2 files
11:44:49 AM: You are not using Netlify Edge Functions for image format detection. Set env var "NEXT_FORCE_EDGE_IMAGES=true" to enable.
11:44:49 AM: ✨ Deploying middleware and functions to Netlify Edge Functions ✨
11:44:49 AM: Netlify configuration property "redirects" value changed to [
11:44:49 AM:   { from: '/_next/static/*', to: '/static/:splat', status: 200 },
11:44:49 AM:   {
11:44:49 AM:     from: '/:locale/_next/static/*',
11:44:49 AM:     to: '/static/:splat',
11:44:49 AM:     status: 200
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/image*',
11:44:49 AM:     query: { url: ':url', w: ':width', q: ':quality' },
11:44:49 AM:     to: '/_ipx/w_:width,q_:quality/:url',
11:44:49 AM:     status: 301
11:44:49 AM:   },
11:44:49 AM:   { from: '/_ipx/*', to: '/.netlify/builders/_ipx', status: 200 },
11:44:49 AM:   {
11:44:49 AM:     from: '/',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: true,
11:44:49 AM:     conditions: { Cookie: [Array] }
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/api/*',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/favicon-32x32.png',
11:44:49 AM:     to: '/favicon-32x32.png',
11:44:49 AM:     conditions: { Cookie: [Array] },
11:44:49 AM:     status: 200
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/fonts/Montserrat-Black.woff2',
11:44:49 AM:     to: '/fonts/Montserrat-Black.woff2',
11:44:49 AM:     conditions: { Cookie: [Array] },
11:44:49 AM:     status: 200
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/fonts/Montserrat-Bold.woff2',
11:44:49 AM:     to: '/fonts/Montserrat-Bold.woff2',
11:44:49 AM:     conditions: { Cookie: [Array] },
11:44:49 AM:     status: 200
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/fonts/Montserrat-Medium.woff2',
11:44:49 AM:     to: '/fonts/Montserrat-Medium.woff2',
11:44:49 AM:     conditions: { Cookie: [Array] },
11:44:49 AM:     status: 200
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/fonts/Montserrat-Regular.woff2',
11:44:49 AM:     to: '/fonts/Montserrat-Regular.woff2',
11:44:49 AM:     conditions: { Cookie: [Array] },
11:44:49 AM:     status: 200
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/images/logo.png',
11:44:49 AM:     to: '/images/logo.png',
11:44:49 AM:     conditions: { Cookie: [Array] },
11:44:49 AM:     status: 200
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/*',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     conditions: { Cookie: [Array] },
11:44:49 AM:     force: true
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/advertise.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/advertise',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/creations/following.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/creations/following',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/creations/most-recent.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/creations/most-recent',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/creations/top-rated.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/creations/top-rated',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/creations/trending.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/creations/trending',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/creations/with-highest-followers.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/creations/with-highest-followers',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/legal/privacy-policy.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/legal/privacy-policy',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/legal/terms.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/legal/terms',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/marketplace.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/marketplace',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/me/account.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/me/account',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/me/channel/create.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/me/channel/create',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/me/channel/update.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/me/channel/update',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/me/creation/upload.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/me/creation/upload',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/auth/login.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/auth/login/*',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/auth/login',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/auth/login/*',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/auth/register.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/auth/register/*',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/auth/register',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/auth/register/*',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/channel/:channelHandle.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/channel/:channelHandle',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/_next/data/ju1HirELZyYlKNTZznptJ/en/creation/:assetSlug.json',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/creation/:assetSlug',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200,
11:44:49 AM:     force: false
11:44:49 AM:   },
11:44:49 AM:   {
11:44:49 AM:     from: '/*',
11:44:49 AM:     to: '/.netlify/functions/___netlify-handler',
11:44:49 AM:     status: 200
11:44:49 AM:   }
11:44:49 AM: ].
11:44:49 AM: ​
11:44:49 AM: (@netlify/plugin-nextjs onBuild completed in 168ms)
11:44:49 AM: ​
11:44:49 AM: Functions bundling                                            
11:44:49 AM: ────────────────────────────────────────────────────────────────
11:44:49 AM: ​
11:44:49 AM: Packaging Functions from .netlify/functions-internal directory:
11:44:49 AM:  - ___netlify-handler/___netlify-handler.js
11:44:49 AM:  - ___netlify-odb-handler/___netlify-odb-handler.js
11:44:49 AM:  - _ipx/_ipx.js
11:44:49 AM: ​
11:45:31 AM: ​
11:45:31 AM: (Functions bundling completed in 41.9s)
11:45:31 AM: ​
11:45:31 AM: Edge Functions bundling                                       
11:45:31 AM: ────────────────────────────────────────────────────────────────
11:45:31 AM: ​
11:45:31 AM: Packaging Edge Functions from .netlify/edge-functions directory:
11:45:31 AM:  - next_src_middleware
11:45:38 AM: ​
11:45:38 AM: (Edge Functions bundling completed in 7s)
11:45:38 AM: ​
11:45:38 AM: @netlify/plugin-nextjs (onPostBuild event)                    
11:45:38 AM: ────────────────────────────────────────────────────────────────
11:45:38 AM: ​
11:45:39 AM: Next.js cache saved.
11:45:39 AM: 🧪 Thank you for testing "appDir" support on Netlify. For known issues and to give feedback, visit https://ntl.fyi/next-13-feedback
11:45:39 AM: ​
11:45:39 AM: (@netlify/plugin-nextjs onPostBuild completed in 1.5s)
11:45:39 AM: ​
11:45:39 AM: @netlify/plugin-lighthouse (onPostBuild event)                
11:45:39 AM: ────────────────────────────────────────────────────────────────
11:45:39 AM: ​
11:45:39 AM: Generating Lighthouse report. This may take a minute…
11:45:39 AM: Running Lighthouse on .next/
11:45:39 AM: Serving and scanning site from directory .next
11:45:45 AM: ERRORED_DOCUMENT_REQUEST
11:45:45 AM: Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Status code: 404)
11:45:45 AM: ​
11:45:45 AM: (@netlify/plugin-lighthouse onPostBuild completed in 5.9s)
11:45:45 AM: ​
11:45:45 AM: Deploy site                                                   
11:45:45 AM: ────────────────────────────────────────────────────────────────
11:45:45 AM: ​
11:45:45 AM: Starting to deploy site from 'webapp/.next'
11:45:46 AM: Calculating files to upload
11:45:46 AM: 56 new files to upload
11:45:46 AM: 3 new functions to upload
11:45:55 AM: Section completed: deploying
11:45:55 AM: Site deploy was successfully initiated
11:45:55 AM: ​
11:45:55 AM: (Deploy site completed in 9.9s)
11:45:55 AM: Starting post processing

If it helps someone, here’s how I solved this.

  1. removed the i18n config from next.config.js
i18n: {
    locales: ["en"],
    defaultLocale: "en",
  },

in my case, I don’t need it at all.
Then I started getting a 500 internal server error, and the below trick solved it.
Server.edge not defined Error on nextJS SSR functions cause site to return 500 Errors - #31 by lewisking Preformatted text

1 Like

Thanks for coming back and sharing your solution!

You just saved me so much time, thanks for this hint!
I guess this config is no more needed with app router and therefore might break the application somehow.