Failed to load resource: the server responded with a status of 404 ()

I have a problem with building a project. It looks like all the assets have the wrong path. For some reason, i see an error in the console “Failed to load resource: the server responded with a status of 404 ()”. The project locally builds both as develop and production build without any errors.

Link to site:
https://test-akrobatyka-panel.netlify.app

logs:

12:46:24 PM: build-image version: d7b3813f01c06610bc1723ff1b22446513ee7941 (focal)
12:46:24 PM: build-image tag: v4.14.3
12:46:24 PM: buildbot version: be0925a1b4e8f8d2c5a767f3e0decf8856cad273
12:46:24 PM: Building without cache
12:46:24 PM: Starting to prepare the repo for build
12:46:24 PM: No cached dependencies found. Cloning fresh repo
12:46:24 PM: git clone https://github.com/darkkatarsis/akrobatyka-panel
12:46:26 PM: Preparing Git Reference refs/heads/test
12:46:26 PM: Parsing package.json dependencies
12:46:28 PM: Starting build script
12:46:28 PM: Installing dependencies
12:46:28 PM: Python version set to 2.7
12:46:28 PM: Downloading and installing node v16.18.1...
12:46:28 PM: Downloading https://nodejs.org/dist/v16.18.1/node-v16.18.1-linux-x64.tar.xz...
12:46:29 PM: Computing checksum with sha256sum
12:46:29 PM: Checksums matched!
12:46:31 PM: Now using node v16.18.1 (npm v8.19.2)
12:46:31 PM: Enabling node corepack
12:46:31 PM: Started restoring cached build plugins
12:46:31 PM: Finished restoring cached build plugins
12:46:31 PM: Attempting ruby version 2.7.2, read from environment
12:46:31 PM: Using ruby version 2.7.2
12:46:32 PM: Using PHP version 8.0
12:46:32 PM: No npm workspaces detected
12:46:32 PM: Started restoring cached node modules
12:46:32 PM: Finished restoring cached node modules
12:46:32 PM: Installing NPM modules using NPM version 8.19.2
12:46:33 PM: npm WARN old lockfile
12:46:33 PM: npm WARN old lockfile The package-lock.json file was created with an old version of npm,
12:46:33 PM: npm WARN old lockfile so supplemental metadata must be fetched from the registry.
12:46:33 PM: npm WARN old lockfile
12:46:33 PM: npm WARN old lockfile This is a one-time fix-up, please be patient...
12:46:33 PM: npm WARN old lockfile
12:46:43 PM: npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
12:47:05 PM: added 1339 packages, and audited 1340 packages in 33s
12:47:05 PM: 174 packages are looking for funding
12:47:05 PM:   run `npm fund` for details
12:47:05 PM: 1 critical severity vulnerability
12:47:05 PM: To address all issues, run:
12:47:05 PM:   npm audit fix
12:47:05 PM: Run `npm audit` for details.
12:47:05 PM: NPM modules installed
12:47:05 PM: Creating package sha
12:47:06 PM: Started restoring cached go cache
12:47:06 PM: Finished restoring cached go cache
12:47:06 PM: Installing Go version 1.17 (requested 1.17)
12:47:10 PM: unset GOOS;
12:47:10 PM: unset GOARCH;
12:47:10 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
12:47:10 PM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
12:47:10 PM: go version >&2;
12:47:10 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
12:47:10 PM: go version go1.17 linux/amd64
12:47:10 PM: Detected 1 framework(s)
12:47:10 PM: "next" at version "13.0.3"
12:47:10 PM: Installing missing commands
12:47:10 PM: Verify run directory
12:47:12 PM: ​
12:47:12 PM: ────────────────────────────────────────────────────────────────
12:47:12 PM:   Netlify Build                                                 
12:47:12 PM: ────────────────────────────────────────────────────────────────
12:47:12 PM: ​
12:47:12 PM: ❯ Version
12:47:12 PM:   @netlify/build 28.1.13
12:47:12 PM: ​
12:47:12 PM: ❯ Flags
12:47:12 PM:   baseRelDir: true
12:47:12 PM:   buildId: 6370d8f6524c8f3273e08710
12:47:12 PM:   deployId: 6370d8f6524c8f3273e08712
12:47:12 PM: ​
12:47:12 PM: ❯ Current directory
12:47:12 PM:   /opt/build/repo
12:47:12 PM: ​
12:47:12 PM: ❯ Config file
12:47:12 PM:   No config file was defined: using default values.
12:47:12 PM: ​
12:47:12 PM: ❯ Context
12:47:12 PM:   production
12:47:12 PM: ​
12:47:12 PM: ❯ Using Next.js Runtime - v4.29.0
12:47:13 PM: ​
12:47:13 PM: ────────────────────────────────────────────────────────────────
12:47:13 PM:   1. @netlify/plugin-nextjs (onPreBuild event)                  
12:47:13 PM: ────────────────────────────────────────────────────────────────
12:47:13 PM: ​
12:47:13 PM: No Next.js cache to restore.
12:47:13 PM: Netlify configuration property "build.environment.NEXT_PRIVATE_TARGET" value changed.
12:47:13 PM: ​
12:47:13 PM: (@netlify/plugin-nextjs onPreBuild completed in 15ms)
12:47:13 PM: ​
12:47:13 PM: ────────────────────────────────────────────────────────────────
12:47:13 PM:   2. Build command from Netlify app                             
12:47:13 PM: ────────────────────────────────────────────────────────────────
12:47:13 PM: ​
12:47:13 PM: $ npm run build
12:47:13 PM: > akrobatyka-trojmiasto-panel@2.0.0 build
12:47:13 PM: > next build
12:47:15 PM: warn  - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
12:47:15 PM: info  - Linting and checking validity of types...
12:47:18 PM: ./pages/group/list/[id].js
12:47:18 PM: 142:8  Warning: React Hook useEffect has a missing dependency: 'select'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
12:47:18 PM: ./pages/payments/index.js
12:47:18 PM: 222:8  Warning: React Hook useEffect has a missing dependency: 'select'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
12:47:18 PM: ./pages/presence/[id].js
12:47:18 PM: 91:8  Warning: React Hook useEffect has missing dependencies: 'currentSeason' and 'membersData'. Either include them or remove the dependency array. If 'setPresenceList' needs the current value of 'membersData', you can also switch to useReducer instead of useState and read 'membersData' in the reducer.  react-hooks/exhaustive-deps
12:47:18 PM: info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
12:47:18 PM: info  - Creating an optimized production build...
12:47:18 PM: > [PWA] Compile client (static)
12:47:18 PM: > [PWA] Auto register service worker with: /opt/build/repo/node_modules/next-pwa/register.js
12:47:18 PM: > [PWA] Service worker: /opt/build/repo/public/sw.js
12:47:18 PM: > [PWA]   url: /sw.js
12:47:18 PM: > [PWA]   scope: /
12:47:18 PM: > [PWA] Fallback to precache routes when fetch failed from cache or network:
12:47:18 PM: > [PWA]   document (page): /offline
12:47:19 PM: > [PWA] Compile server
12:47:19 PM: > [PWA] Compile server
12:47:47 PM: info  - Compiled successfully
12:47:47 PM: info  - Collecting page data...
12:47:57 PM: info  - Generating static pages (0/9)
12:47:58 PM: info  - Generating static pages (2/9)
12:47:58 PM: info  - Generating static pages (4/9)
12:47:58 PM: info  - Generating static pages (6/9)
12:47:58 PM: info  - Generating static pages (9/9)
12:47:59 PM: info  - Finalizing page optimization...
12:47:59 PM: Route (pages)                                 Size     First Load JS
12:47:59 PM: ┌ λ /                                         667 B           160 kB
12:47:59 PM: ├   /_app                                     0 B             160 kB
12:47:59 PM: ├ ○ /404 (762 ms)                             394 B           160 kB
....... 
redacted
......
12:47:59 PM: + First Load JS shared by all                 161 kB
12:47:59 PM:   ├ chunks/framework-05c5206d76924e06.js      45.7 kB
12:47:59 PM:   ├ chunks/main-ce82e406e58fb22a.js           35.3 kB
12:47:59 PM:   ├ chunks/pages/_app-6b1a09fedede4a8c.js     75.9 kB
12:47:59 PM:   ├ chunks/webpack-4cae3ce7df809360.js        2.81 kB
12:47:59 PM:   └ css/15ffb93a1ba06d58.css                  1.39 kB
12:47:59 PM: λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
12:47:59 PM: ○  (Static)  automatically rendered as static HTML (uses no initial props)
12:47:59 PM: ​
12:47:59 PM: (build.command completed in 45.6s)
12:47:59 PM: ​
12:47:59 PM: ────────────────────────────────────────────────────────────────
12:47:59 PM:   3. @netlify/plugin-nextjs (onBuild event)                     
12:47:59 PM: ────────────────────────────────────────────────────────────────
12:47:59 PM: ​
12:47:59 PM: NextAuth package detected, NEXTAUTH_URL environment variable set by user in Netlify configuration to https://test-akrobatyka-panel.netlify.app
12:47:59 PM: { functionsDir: '/opt/build/repo/.netlify/functions-internal' }
12:47:59 PM: Patching /opt/build/repo/node_modules/next/dist/server/base-server.js
12:47:59 PM: Done
12:47:59 PM: Patching /opt/build/repo/node_modules/next/dist/server/next-server.js
12:47:59 PM: Done
12:47:59 PM: Moving static page files to serve from CDN...
12:47:59 PM: Moved 2 files
12:47:59 PM: Using Netlify Edge Functions for image format detection. Set env var "NEXT_DISABLE_EDGE_IMAGES=true" to disable.
12:47:59 PM: Netlify configuration property "redirects" value changed to [
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/image*',
12:47:59 PM:     query: { url: ':url', w: ':width', q: ':quality' },
12:47:59 PM:     to: '/_ipx/w_:width,q_:quality/:url',
12:47:59 PM:     status: 301
12:47:59 PM:   },
12:47:59 PM:   { from: '/_ipx/*', to: '/.netlify/builders/_ipx', status: 200 },
12:47:59 PM:   {
12:47:59 PM:     from: '/',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: true,
12:47:59 PM:     conditions: { Cookie: [Array] }
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/',
12:47:59 PM:     to: '/pl',
12:47:59 PM:     status: 301,
12:47:59 PM:     conditions: { Language: [Array] },
12:47:59 PM:     force: true
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/api/*',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200
12:47:59 PM:   },
12:47:59 PM:   {
....... 
redacted
......
12:47:59 PM:   {
12:47:59 PM:     from: '/splash/images/img_0.png',
12:47:59 PM:     to: '/splash/images/img_0.png',
12:47:59 PM:     conditions: { Cookie: [Array] },
12:47:59 PM:     status: 200
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/*',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     conditions: { Cookie: [Array] },
12:47:59 PM:     force: true
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/en/index.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/pl/index.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/pl/',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/en/customer/add.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/customer/add',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/pl/customer/add.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/pl/customer/add',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/en/customers.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/customers',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/pl/customers.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/pl/customers',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/en/group/add.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/group/add',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/pl/group/add.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/pl/group/add',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/en/groups.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/groups',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/pl/groups.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/pl/groups',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/en/login.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/login',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/pl/login.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/pl/login',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/en/offline.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/offline',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/pl/offline.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/pl/offline',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/en/outfits.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/outfits',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/pl/outfits.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/pl/outfits',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/en/payments.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/payments',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/pl/payments.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/pl/payments',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/en/season/add.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/season/add',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/pl/season/add.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/pl/season/add',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   {
12:47:59 PM:     from: '/_next/data/NvMgQxxZj7XR9S_bOj43-/en/seasons.json',
12:47:59 PM:     to: '/.netlify/functions/___netlify-handler',
12:47:59 PM:     status: 200,
12:47:59 PM:     force: false
12:47:59 PM:   },
12:47:59 PM:   ... 36 more items
12:47:59 PM: ].
12:47:59 PM: ​
12:47:59 PM: (@netlify/plugin-nextjs onBuild completed in 515ms)
12:47:59 PM: ​
12:47:59 PM: ────────────────────────────────────────────────────────────────
12:47:59 PM:   4. Functions bundling                                         
12:47:59 PM: ────────────────────────────────────────────────────────────────
12:47:59 PM: ​
12:47:59 PM: Packaging Functions from .netlify/functions-internal directory:
12:47:59 PM:  - ___netlify-handler/___netlify-handler.js
12:47:59 PM:  - ___netlify-odb-handler/___netlify-odb-handler.js
12:47:59 PM:  - _ipx/_ipx.js
12:47:59 PM: ​
12:48:28 PM: ​
12:48:28 PM: (Functions bundling completed in 28.3s)
12:48:28 PM: ​
12:48:28 PM: ────────────────────────────────────────────────────────────────
12:48:28 PM:   5. Edge Functions bundling                                    
12:48:28 PM: ────────────────────────────────────────────────────────────────
12:48:28 PM: ​
12:48:28 PM: Packaging Edge Functions from .netlify/edge-functions directory:
12:48:28 PM:  - ipx
12:48:29 PM: ​
12:48:29 PM: (Edge Functions bundling completed in 1.4s)
12:48:29 PM: ​
12:48:29 PM: ────────────────────────────────────────────────────────────────
12:48:29 PM:   6. @netlify/plugin-nextjs (onPostBuild event)                 
12:48:29 PM: ────────────────────────────────────────────────────────────────
12:48:29 PM: ​
12:48:29 PM: Next.js cache saved.
12:48:29 PM: You have the following Netlify rewrites that might cause conflicts with the Next.js Runtime:
12:48:29 PM: 
12:48:29 PM: - /android-chrome-192x192-black.png /android-chrome-192x192-black.png 200
12:48:29 PM: - /android-chrome-192x192.png /android-chrome-192x192.png 200
12:48:29 PM: - /android-chrome-384x384-black.png /android-chrome-384x384-black.png 200
12:48:29 PM: - /android-chrome-384x384.png /android-chrome-384x384.png 200
12:48:29 PM: - /android-chrome-512x512-black.png /android-chrome-512x512-black.png 200
12:48:29 PM: - /android-chrome-512x512.png /android-chrome-512x512.png 200
12:48:29 PM: - /apple-touch-icon-black.png /apple-touch-icon-black.png 200
12:48:29 PM: - /apple-touch-icon.png /apple-touch-icon.png 200
12:48:29 PM: - /dark-logo@2x.png /dark-logo@2x.png 200
12:48:30 PM: Creating deploy upload records
12:48:29 PM: - /dark-manifest.json /dark-manifest.json 200
12:48:29 PM: - /fallback-NvMgQxxZj7XR9S_bOj43-.js /fallback-NvMgQxxZj7XR9S_bOj43-.js 200
12:48:29 PM: - /favicon-16x16.png /favicon-16x16.png 200
12:48:29 PM: - /favicon-32x32.png /favicon-32x32.png 200
12:48:29 PM: - /favicon.ico /favicon.ico 200
12:48:29 PM: - /logo@2x.png /logo@2x.png 200
12:48:29 PM: - /manifest.json /manifest.json 200
12:48:29 PM: - /sw.js /sw.js 200
12:48:29 PM: - /workbox-946f13af.js /workbox-946f13af.js 200
12:48:29 PM: - /splash/dark-data.json /splash/dark-data.json 200
12:48:29 PM: - /splash/data.json /splash/data.json 200
12:48:29 PM: - /locales/en/common.json /locales/en/common.json 200
12:48:29 PM: - /locales/en/customer.json /locales/en/customer.json 200
12:48:29 PM: - /locales/en/customers.json /locales/en/customers.json 200
12:48:29 PM: - /locales/en/group-list.json /locales/en/group-list.json 200
12:48:29 PM: - /locales/en/group.json /locales/en/group.json 200
12:48:29 PM: - /locales/en/groups.json /locales/en/groups.json 200
12:48:29 PM: - /locales/en/index.json /locales/en/index.json 200
12:48:29 PM: - /locales/en/offline.json /locales/en/offline.json 200
12:48:29 PM: - /locales/en/outfits.json /locales/en/outfits.json 200
12:48:29 PM: - /locales/en/payments.json /locales/en/payments.json 200
12:48:29 PM: - /locales/en/presence.json /locales/en/presence.json 200
12:48:29 PM: - /locales/en/season.json /locales/en/season.json 200
12:48:29 PM: - /locales/en/seasons.json /locales/en/seasons.json 200
12:48:29 PM: - /locales/en/timelog.json /locales/en/timelog.json 200
12:48:29 PM: - /locales/en/user.json /locales/en/user.json 200
12:48:29 PM: - /locales/en/users.json /locales/en/users.json 200
12:48:29 PM: - /locales/pl/common.json /locales/pl/common.json 200
12:48:29 PM: - /locales/pl/customer.json /locales/pl/customer.json 200
12:48:29 PM: - /locales/pl/customers.json /locales/pl/customers.json 200
12:48:29 PM: - /locales/pl/group-list.json /locales/pl/group-list.json 200
12:48:29 PM: - /locales/pl/group.json /locales/pl/group.json 200
12:48:29 PM: - /locales/pl/groups.json /locales/pl/groups.json 200
12:48:29 PM: - /locales/pl/index.json /locales/pl/index.json 200
12:48:29 PM: - /locales/pl/offline.json /locales/pl/offline.json 200
12:48:29 PM: - /locales/pl/outfits.json /locales/pl/outfits.json 200
12:48:29 PM: - /locales/pl/payments.json /locales/pl/payments.json 200
12:48:29 PM: - /locales/pl/presence.json /locales/pl/presence.json 200
12:48:29 PM: - /locales/pl/season.json /locales/pl/season.json 200
12:48:29 PM: - /locales/pl/seasons.json /locales/pl/seasons.json 200
12:48:29 PM: - /locales/pl/timelog.json /locales/pl/timelog.json 200
12:48:29 PM: - /locales/pl/user.json /locales/pl/user.json 200
12:48:29 PM: - /locales/pl/users.json /locales/pl/users.json 200
12:48:29 PM: - /splash/images/img_0.png /splash/images/img_0.png 200
12:48:29 PM: 
12:48:29 PM: For more information, see https://ntl.fyi/next-rewrites
12:48:29 PM: Netlify configuration property "build.publish" value changed to '.next/dist'.
12:48:29 PM: ​
12:48:29 PM: (@netlify/plugin-nextjs onPostBuild completed in 265ms)
12:48:29 PM: ​
12:48:29 PM: ────────────────────────────────────────────────────────────────
12:48:29 PM:   7. Deploy site                                                
12:48:29 PM: ────────────────────────────────────────────────────────────────
12:48:29 PM: ​
12:48:29 PM: Starting to deploy site from '.next'
12:48:30 PM: Creating deploy tree 
12:48:30 PM: 47 new files to upload
12:48:30 PM: 3 new functions to upload
12:48:40 PM: Site deploy was successfully initiated
12:48:40 PM: ​
12:48:40 PM: (Deploy site completed in 10.4s)
12:48:40 PM: ​
12:48:40 PM: ────────────────────────────────────────────────────────────────
12:48:40 PM:   Netlify Build Complete                                        
12:48:40 PM: ────────────────────────────────────────────────────────────────
12:48:40 PM: ​
12:48:40 PM: (Netlify Build completed in 1m 28.2s)
12:48:40 PM: Starting post processing
12:48:40 PM: Caching artifacts
12:48:40 PM: Started saving node modules
12:48:40 PM: Post processing - HTML
12:48:40 PM: Finished saving node modules
12:48:40 PM: Started saving build plugins
12:48:40 PM: Finished saving build plugins
12:48:40 PM: Started saving pip cache
12:48:40 PM: Finished saving pip cache
12:48:40 PM: Started saving emacs cask dependencies
12:48:40 PM: Finished saving emacs cask dependencies
12:48:40 PM: Started saving maven dependencies
12:48:40 PM: Finished saving maven dependencies
12:48:40 PM: Started saving boot dependencies
12:48:40 PM: Finished saving boot dependencies
12:48:40 PM: Started saving rust rustup cache
12:48:41 PM: Post processing - header rules
12:48:40 PM: Finished saving rust rustup cache
12:48:40 PM: Started saving go dependencies
12:48:40 PM: Finished saving go dependencies
12:48:41 PM: Post processing - redirect rules
12:48:41 PM: Post processing done
12:48:44 PM: Build script success
12:48:45 PM: Site is live ✨
12:48:46 PM: Uploading Cache of size 241.5MB
12:48:48 PM: Finished processing build request in 2m23.605782106s

Hi @darkkatarsis, kindly try the suggestion in the link below as the error messages in your build log is similar.
Also make sure you update Next.js to the latest version.

Let me know the outcome after your try the suggestions.
Thanks.

@clarnx Thank you for the quick reply. Unfortunately, adding a new environment variable did not help. I continue to see the same error after rebuilding the environment. Below is my package.json file. It’s worth noting that moving from nextjs 13.0.0 to 13.0.1 there were no problems with the site. Downgrade to a lower version of nextjs (e.g. 13.0.0) and a lower version of plugin-nextjs didn’t help either.

package.json

{
    "name": "site",
    "version": "2.0.0",
    "private": true,
    "scripts": {
        "dev": "next dev",
        "build": "next build",
        "start": "next start",
        "lint": "next lint"
    },
    "dependencies": {
        "@emotion/react": "^11.10.5",
        "@emotion/styled": "^11.10.5",
        "@fontsource/roboto": "^4.5.8",
        "@hookform/resolvers": "^2.9.10",
        "@mdi/js": "^7.0.96",
        "@mui/icons-material": "^5.10.9",
        "@mui/lab": "^5.0.0-alpha.107",
        "@mui/material": "^5.10.13",
        "@mui/x-data-grid": "^5.17.11",
        "@mui/x-date-pickers": "^5.0.8",
        "@svgr/webpack": "^6.5.1",
        "dayjs": "^1.11.6",
        "eslint-config-next": "^13.0.3",
        "js-cookie": "^3.0.1",
        "material-ui-popup-state": "^4.1.0",
        "mongodb": "^4.11.0",
        "mui-tel-input": "^2.0.4",
        "next": "13.0.3",
        "next-auth": "^4.16.4",
        "next-i18next": "^12.1.0",
        "nextjs-progressbar": "^0.0.16",
        "react": "^18.2.0",
        "react-colorful": "^5.6.1",
        "react-detect-offline": "^2.4.5",
        "react-dom": "^18.2.0",
        "react-helmet-async": "^1.3.0",
        "react-hook-form": "^7.39",
        "react-lottie-player": "^1.5.0",
        "sass": "^1.56",
        "sharp": "^0.31.2",
        "yup": "^0.32.11",
        "yup-phone": "^1.3.2"
    },
    "devDependencies": {
        "@netlify/plugin-nextjs": "^4.29.0",
        "async": ">=3.2.4",
        "eslint": "^8.27.0",
        "next-pwa": "5.6.0"
    }
}

Where are you seeing those 404s? I tried visiting your website, but all I get is:

which is expected, because I block service workers.

@clarnx @hrishikesh I also downloaded two builds from the netlify website. The working one and the non-working one. After extracting, I see that they differ in structure. The working one have all files directly in the root directory. The non-working build moved some things to the /dist directory.

@darkkatarsis, thanks for the feedback.

Note that the dist folder, short for distribution folder , is dynamically generated when using the build commands and includes the generated production ready HTML files and assets that are necessary to deploy and run your statically generated application.

@clarnx I’m aware of this, the question is why bumping up the “@netlify/plugin-nextjs” package makes such a difference in the build that eventually a package that was working all the time suddenly stops. If this is intentional, what should I change in my build to get the site working again? I really don’t have an idea anymore, especially since the project locally works very well, and the bug causes addon for nextjs to be bumped up

The solution to the 404 problem was to create a netlify.toml file with the information that I was using the manual version of the plugin “@netlify/plugin-nextjs”

netlify.toml

[[plugins]]
package = "@netlify/plugin-nextjs"
1 Like