I am getting successful build deployed on Netlify for my NextJs app, but I get 404 page not found error

Hello Everyone,

My Netlify Site name is: https://splendrous-kleicha-1c6528.netlify.app

My GitHub repo is : GitHub - karankartikeya/Raje-HomeStay: Website Code for Raje HomeStay

My website is built using NextJs, TypeScript and Sanity.

After having a successful build on Netlify, my website shows 404 error code for all the pages.
I have most of the pages server side rendered which fetches data from Sanity CMS.

I read majority of the answers on previous posts related to this error but none resolved this.
It will be helpful if anyone can guide me on this.

The build log is pasted below for your reference.

12:44:03 AM: build-image version: 4c0c1cadee6a31c9bb8d824514030009c4c05c6a (focal)
12:44:03 AM: build-image tag: v4.15.0
12:44:03 AM: buildbot version: 9ef4dba9386902658d5cc7ad8ca0406443896076
12:44:03 AM: Fetching cached dependencies
12:44:03 AM: Failed to fetch cache, continuing with build
12:44:03 AM: Starting to prepare the repo for build
12:44:03 AM: No cached dependencies found. Cloning fresh repo
12:44:03 AM: git clone GitHub - karankartikeya/Raje-HomeStay: Website Code for Raje HomeStay
12:44:03 AM: Preparing Git Reference refs/heads/main
12:44:04 AM: Parsing package.json dependencies
12:44:05 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘raje_homestay’ versus ‘/’ in the Netlify UI
12:44:05 AM: Section completed: initializing
12:44:05 AM: Starting build script
12:44:05 AM: Installing dependencies
12:44:05 AM: Python version set to 2.7
12:44:06 AM: v16.18.1 is already installed.
12:44:06 AM: Now using node v16.18.1 (npm v8.19.2)
12:44:06 AM: Enabling node corepack
12:44:06 AM: Started restoring cached build plugins
12:44:06 AM: Finished restoring cached build plugins
12:44:06 AM: Attempting ruby version 2.7.2, read from environment
12:44:07 AM: Using ruby version 2.7.2
12:44:07 AM: Using PHP version 8.0
12:44:07 AM: Started restoring cached yarn cache
12:44:07 AM: Finished restoring cached yarn cache
12:44:07 AM: No yarn workspaces detected
12:44:07 AM: Started restoring cached node modules
12:44:07 AM: Finished restoring cached node modules
12:44:07 AM: Installing NPM modules using Yarn version 1.22.19
12:44:07 AM: yarn install v1.22.19
12:44:07 AM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
12:44:07 AM: [1/4] Resolving packages…
12:44:08 AM: [2/4] Fetching packages…
12:44:24 AM: [3/4] Linking dependencies…
12:44:24 AM: warning " > goober@2.1.11" has unmet peer dependency “csstype@^3.0.10”.
12:44:30 AM: [4/4] Building fresh packages…
12:44:30 AM: Done in 22.77s.
12:44:30 AM: NPM modules installed using Yarn
12:44:30 AM: Started restoring cached go cache
12:44:30 AM: Finished restoring cached go cache
12:44:32 AM: Installing Go version 1.19.3 (requested 1.19.x)
12:44:37 AM: unset GOOS;
12:44:37 AM: unset GOARCH;
12:44:37 AM: export GOROOT=‘/opt/buildhome/.gimme/versions/go1.19.3.linux.amd64’;
12:44:37 AM: export PATH=“/opt/buildhome/.gimme/versions/go1.19.3.linux.amd64/bin:${PATH}”;
12:44:37 AM: go version >&2;
12:44:37 AM: export GIMME_ENV=“/opt/buildhome/.gimme/env/go1.19.3.linux.amd64.env”
12:44:37 AM: go version go1.19.3 linux/amd64
12:44:37 AM: Detected 1 framework(s)
12:44:38 AM: “next” at version “13.0.3”
12:44:38 AM: Installing missing commands
12:44:38 AM: Verify run directory
12:44:39 AM: ​
12:44:39 AM: ────────────────────────────────────────────────────────────────
12:44:39 AM: Netlify Build
12:44:39 AM: ────────────────────────────────────────────────────────────────
12:44:39 AM: ​
12:44:39 AM: ❯ Version
12:44:39 AM: @netlify/build 28.4.4
12:44:39 AM: ​
12:44:39 AM: ❯ Flags
12:44:39 AM: baseRelDir: true
12:44:39 AM: buildId: 638a4e768c00a560ef3cc0a4
12:44:39 AM: deployId: 638a4e768c00a560ef3cc0a6
12:44:39 AM: ​
12:44:39 AM: ❯ Current directory
12:44:39 AM: /opt/build/repo/raje_homestay
12:44:39 AM: ​
12:44:39 AM: ❯ Config file
12:44:39 AM: No config file was defined: using default values.
12:44:39 AM: ​
12:44:39 AM: ❯ Context
12:44:39 AM: production
12:44:39 AM: ​
12:44:39 AM: ────────────────────────────────────────────────────────────────
12:44:39 AM: 1. Build command from Netlify app
12:44:39 AM: ────────────────────────────────────────────────────────────────
12:44:39 AM: ​
12:44:39 AM: $ npm run build
12:44:39 AM: > raje_homestay@0.1.0 build
12:44:39 AM: > next build
12:44:39 AM: warn - No build cache found. Please configure build caching for faster rebuilds. Read more: no-cache | Next.js
12:44:40 AM: info - Linting and checking validity of types…
12:44:43 AM: info - Creating an optimized production build…
12:44:51 AM: info - Compiled successfully
12:44:51 AM: info - Collecting page data…
12:44:55 AM: info - Generating static pages (0/3)
12:44:55 AM: info - Generating static pages (3/3)
12:44:56 AM: info - Finalizing page optimization…
12:44:56 AM: Route (pages) Size First Load JS
12:44:56 AM: ┌ λ / 17 kB 176 kB
12:44:56 AM: ├ /_app 0 B 79.6 kB
12:44:56 AM: ├ ○ /404 212 B 79.8 kB
12:44:56 AM: ├ λ /api/checkRoomsNumAvailability 0 B 79.6 kB
12:44:56 AM: ├ λ /api/confirmRoom 0 B 79.6 kB
12:44:56 AM: ├ λ /api/createRoom 0 B 79.6 kB
12:44:56 AM: ├ λ /api/deleteBooking 0 B 79.6 kB
12:44:56 AM: Creating deploy upload records
12:44:56 AM: ├ λ /api/getAmenities 0 B 79.6 kB
12:44:56 AM: ├ λ /api/getBanner 0 B 79.6 kB
12:44:56 AM: ├ λ /api/getBookings 0 B 79.6 kB
12:44:56 AM: ├ λ /api/getGallery 0 B 79.6 kB
12:44:56 AM: ├ λ /api/getRoom 0 B 79.6 kB
12:44:56 AM: Starting post processing
12:44:56 AM: ├ λ /api/getRooms 0 B 79.6 kB
12:44:56 AM: ├ λ /api/getSocials 0 B 79.6 kB
12:44:56 AM: ├ λ /api/razorpay 0 B 79.6 kB
12:44:56 AM: ├ λ /api/reserveRoom 0 B 79.6 kB
12:44:56 AM: Post processing - HTML
12:44:56 AM: ├ λ /api/sendMail 0 B 79.6 kB
12:44:56 AM: ├ λ /confirmRoom/[roomId] 8.24 kB 94.9 kB
12:44:56 AM: ├ └ css/53a9169c96cbb4d8.css 2.2 kB
12:44:56 AM: Post processing - header rules
12:44:56 AM: ├ λ /roomDescription/[roomId] 4.39 kB 160 kB
12:44:56 AM: ├ λ /search 3.81 kB 160 kB
12:44:56 AM: └ ○ /success 520 B 80.1 kB
12:44:57 AM: Post processing - redirect rules
12:44:56 AM: + First Load JS shared by all 84.8 kB
12:44:56 AM: ├ chunks/framework-ffee79c6390da51e.js 45.7 kB
12:44:56 AM: ├ chunks/main-5cebf592faf0463a.js 31.8 kB
12:44:56 AM: ├ chunks/pages/_app-072defe174dca891.js 1 kB
12:44:57 AM: Post processing done
12:44:56 AM: ├ chunks/webpack-1515c7250ec9b99c.js 1.08 kB
12:44:56 AM: └ css/e4a1caf292cf63ef.css 5.25 kB
12:44:56 AM: λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
12:44:57 AM: Section completed: postprocessing
12:44:56 AM: ○ (Static) automatically rendered as static HTML (uses no initial props)
12:44:56 AM: ​
12:44:56 AM: (build.command completed in 16.7s)
12:44:56 AM: ​
12:44:56 AM: ────────────────────────────────────────────────────────────────
12:44:56 AM: 2. Deploy site
12:44:56 AM: ────────────────────────────────────────────────────────────────
12:44:56 AM: ​
12:44:56 AM: Starting to deploy site from ‘raje_homestay’
12:44:56 AM: Creating deploy tree
12:44:56 AM: 0 new files to upload
12:44:56 AM: 0 new functions to upload
12:44:56 AM: Section completed: deploying
12:44:56 AM: Site deploy was successfully initiated
12:44:56 AM: ​
12:44:56 AM: (Deploy site completed in 393ms)
12:44:56 AM: ​
12:44:56 AM: ────────────────────────────────────────────────────────────────
12:44:56 AM: Netlify Build Complete
12:44:56 AM: ────────────────────────────────────────────────────────────────
12:44:56 AM: ​
12:44:56 AM: (Netlify Build completed in 17.2s)
12:44:56 AM: Caching artifacts
12:44:56 AM: Started saving node modules
12:44:56 AM: Finished saving node modules
12:44:56 AM: Started saving build plugins
12:44:56 AM: Finished saving build plugins
12:44:56 AM: Started saving yarn cache
12:45:00 AM: Site is live :sparkles:
12:45:02 AM: Finished saving yarn cache
12:45:02 AM: Started saving pip cache
12:45:02 AM: Finished saving pip cache
12:45:02 AM: Started saving emacs cask dependencies
12:45:03 AM: Finished saving emacs cask dependencies
12:45:03 AM: Started saving maven dependencies
12:45:03 AM: Finished saving maven dependencies
12:45:03 AM: Started saving boot dependencies
12:45:03 AM: Finished saving boot dependencies
12:45:03 AM: Started saving rust rustup cache
12:45:03 AM: Finished saving rust rustup cache
12:45:03 AM: Started saving go dependencies
12:45:03 AM: Finished saving go dependencies
12:45:03 AM: Build script success
12:45:03 AM: Section completed: building
12:45:07 AM: Uploading Cache of size 792.8MB
12:45:12 AM: Section completed: cleanup
12:45:12 AM: Finished processing build request in 1m9.865379827s

Please make sure the Next.js Runtime is installed: