Nextjs v14 deployment results 404 on all sources

Hi,

the project works on local with netlify cli commands,

“netlify dev” or “netlify dev --context production”

Also runs on vercel without any issues.

I did not create custom toml configuration, let netlify to use it’s defaults.

After successfull build, the browser console gives error to all sources:

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

i m using:
"next": "14.2.5"

this is my nextjs config (next.config.mjs):

/** @type {import('next').NextConfig} */
const nextConfig = {
	reactStrictMode: false,
	swcMinify: true,
	eslint: {
		ignoreDuringBuilds: process.env.NODE_ENV === 'production'
	},
	typescript: {
		ignoreBuildErrors: true
	},
	webpack: (config) => {
		if (config.module && config.module.rules) {
			config.module.rules.push({
				test: /\.(json|js|ts|tsx|jsx)$/, // include multiple file types
				resourceQuery: /raw/, // applies to imports with ?raw
				use: 'raw-loader' // use raw-loader for raw text
			});
		}

		return config;
	}
};

export default nextConfig;

You can find the deployed site at: https://fuse-next.netlify.app/

This is deploy log:

10:45:53 AM: build-image version: ecdc8b770f4a0193fd3f258c1bc6029e681813a4 (focal)
10:45:53 AM: buildbot version: 31384b9071289c6a22c9a280fe11b85737b6fd56
10:45:53 AM: Building without cache
10:45:53 AM: Starting to prepare the repo for build
10:45:54 AM: No cached dependencies found. Cloning fresh repo
10:45:54 AM: git clone --filter=blob:none https://github.com/mustafahlvc/fuse-nextjs
10:45:54 AM: Preparing Git Reference refs/heads/main
10:45:56 AM: Starting to install dependencies
10:45:57 AM: Python version set to 3.8
10:45:57 AM: Attempting Ruby version 2.7.2, read from environment
10:45:58 AM: Using Ruby version 2.7.2
10:45:58 AM: Started restoring cached go cache
10:45:58 AM: Finished restoring cached go cache
10:45:59 AM: go version go1.19.13 linux/amd64
10:46:00 AM: Using PHP version 8.0
10:46:02 AM: v18.20.4 is already installed.
10:46:02 AM: Now using node v18.20.4 (npm v10.7.0)
10:46:02 AM: Enabling Node.js Corepack
10:46:02 AM: Started restoring cached build plugins
10:46:02 AM: Finished restoring cached build plugins
10:46:02 AM: Started restoring cached corepack dependencies
10:46:02 AM: Finished restoring cached corepack dependencies
10:46:02 AM: No npm workspaces detected
10:46:02 AM: Started restoring cached node modules
10:46:02 AM: Finished restoring cached node modules
10:46:02 AM: Installing npm packages using npm version 10.7.0
10:46:35 AM: added 1601 packages, and audited 1602 packages in 33s
10:46:35 AM: 245 packages are looking for funding
10:46:35 AM:   run `npm fund` for details
10:46:35 AM: found 0 vulnerabilities
10:46:35 AM: npm packages installed
10:46:36 AM: Successfully installed dependencies
10:46:36 AM: Starting build script
10:46:37 AM: Detected 1 framework(s)
10:46:37 AM: "next" at version "14.2.5"
10:46:37 AM: Section completed: initializing
10:46:38 AM: ​
10:46:38 AM: Netlify Build                                                 
10:46:38 AM: ────────────────────────────────────────────────────────────────
10:46:38 AM: ​
10:46:38 AM: ❯ Version
10:46:38 AM:   @netlify/build 29.54.0
10:46:38 AM: ​
10:46:38 AM: ❯ Flags
10:46:38 AM:   accountId: 628504324a6fbe223c6455de
10:46:38 AM:   baseRelDir: true
10:46:38 AM:   buildId: 66d56d262870b1bb7c1c03c5
10:46:38 AM:   deployId: 66d56d262870b1bb7c1c03c7
10:46:39 AM: ​
10:46:39 AM: ❯ Current directory
10:46:39 AM:   /opt/build/repo
10:46:39 AM: ​
10:46:39 AM: ❯ Config file
10:46:39 AM:   /opt/build/repo/netlify.toml
10:46:39 AM: ​
10:46:39 AM: ❯ Context
10:46:39 AM:   production
10:46:39 AM: ​
10:46:39 AM: ❯ Using Next.js Runtime - v5.7.0
10:46:41 AM: No Next.js cache to restore
10:46:41 AM: ​
10:46:41 AM: build.command from netlify.toml                               
10:46:41 AM: ────────────────────────────────────────────────────────────────
10:46:41 AM: ​
10:46:41 AM: $ npm run build
10:46:41 AM: > fuse-react-app@11.1.0 build
10:46:41 AM: > next build
10:46:41 AM: ⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
10:46:41 AM:   ▲ Next.js 14.2.5
10:46:41 AM:   - Environments: .env
10:46:41 AM:    Creating an optimized production build ...
10:48:08 AM:  ✓ Compiled successfully
10:48:08 AM:    Skipping validation of types
10:48:08 AM:    Skipping linting
10:48:09 AM:    Collecting page data ...
10:48:17 AM:    Generating static pages (0/243) ...
10:48:20 AM:    Generating static pages (60/243)
10:48:21 AM:    Generating static pages (121/243)
10:48:23 AM:    Generating static pages (182/243)
10:48:24 AM:  ✓ Generating static pages (243/243)
10:48:25 AM:    Finalizing page optimization ...
10:48:25 AM:    Collecting build traces ...
10:48:43 AM: Route (app)                                                            Size     First Load JS
.
.
.
10:48:43 AM: + First Load JS shared by all                                          87.6 kB
10:48:43 AM:   ├ chunks/47023-de5eb556d4669e28.js                                   31.7 kB
10:48:43 AM:   ├ chunks/fd9d1056-189ffeff3c07d2dd.js                                53.6 kB
10:48:43 AM:   └ other shared chunks (total)                                        2.29 kB
10:48:43 AM: ○  (Static)   prerendered as static content
10:48:43 AM: ƒ  (Dynamic)  server-rendered on demand
10:48:43 AM: ​
10:48:43 AM: (build.command completed in 2m 2.2s)
10:48:45 AM: Next.js cache saved
10:48:47 AM: ​
10:48:47 AM: Functions bundling                                            
10:48:47 AM: ────────────────────────────────────────────────────────────────
10:48:47 AM: ​
10:48:47 AM: Packaging Functions from .netlify/functions-internal directory:
10:48:47 AM:  - ___netlify-server-handler/___netlify-server-handler.mjs
10:48:47 AM: ​
10:48:49 AM: ​
10:48:49 AM: (Functions bundling completed in 2.1s)
10:48:52 AM: ​
10:48:52 AM: Deploy site                                                   
10:48:52 AM: ────────────────────────────────────────────────────────────────
10:48:52 AM: ​
10:48:52 AM: Starting to deploy site from '.next'
10:48:52 AM: Calculating files to upload
10:48:55 AM: 65 new file(s) to upload
10:48:55 AM: 1 new function(s) to upload
10:49:02 AM: Starting post processing
10:49:02 AM: Skipping form detection
10:49:02 AM: Post processing - header rules
10:49:02 AM: Section completed: deploying
10:49:03 AM: Site is live ✨
10:49:03 AM: Post processing - redirect rules
10:49:03 AM: Post processing done
10:49:03 AM: Section completed: postprocessing
10:49:04 AM: Finished waiting for live deploy in 2.172s
10:49:04 AM: Site deploy was successfully initiated
10:49:04 AM: ​
10:49:04 AM: (Deploy site completed in 12.5s)
10:49:08 AM: ​
10:49:08 AM: Netlify Build Complete                                        
10:49:08 AM: ────────────────────────────────────────────────────────────────
10:49:08 AM: ​
10:49:08 AM: (Netlify Build completed in 2m 29s)
10:49:08 AM: Caching artifacts
10:49:08 AM: Started saving node modules
10:49:08 AM: Finished saving node modules
10:49:08 AM: Started saving build plugins
10:49:08 AM: Finished saving build plugins
10:49:08 AM: Started saving corepack cache
10:49:08 AM: Finished saving corepack cache
10:49:08 AM: Started saving pip cache
10:49:09 AM: Finished saving pip cache
10:49:09 AM: Started saving emacs cask dependencies
10:49:09 AM: Finished saving emacs cask dependencies
10:49:09 AM: Started saving maven dependencies
10:49:09 AM: Finished saving maven dependencies
10:49:09 AM: Started saving boot dependencies
10:49:09 AM: Finished saving boot dependencies
10:49:09 AM: Started saving rust rustup cache
10:49:09 AM: Finished saving rust rustup cache
10:49:09 AM: Started saving go dependencies
10:49:09 AM: Finished saving go dependencies
10:49:38 AM: Build script success
10:49:38 AM: Section completed: building
10:50:56 AM: Uploading Cache of size 357.3MB
10:50:57 AM: Section completed: cleanup
10:50:57 AM: Finished processing build request in 5m3.875s

I couldn’t find any clue on netlify function logs.

I saw this comment

then try to build and deploy with netlify cli but no luck.

Could you give me suggesstions, please.

The site you’ve linked says not found.