Nextjs build is successful but site css/js is not loaded

Site deploy preview is https://staging–stage-contentideas.netlify.app/

The only error I am getting in the console is ‘Uncaught SyntaxError: Unexpected token ‘<’’ which leads me to believe this is something to do with how netlify moved stuff around while building. When I run the app locally by doing npm run build and npm run start it works fine.

I am using SSG, ISR and Static pages, no SSR.

Deploy log is as follows

... (stuff)
12:06:10 PM: Starting to prepare the repo for build
12:06:11 PM: Preparing Git Reference refs/heads/staging
12:06:11 PM: Parsing package.json dependencies
12:06:12 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'frontend/.next' versus '.next' in the Netlify UI
12:06:13 PM: Starting build script
12:06:13 PM: Installing dependencies
12:06:13 PM: Python version set to 2.7
12:06:13 PM: Started restoring cached Node.js version
12:06:14 PM: Finished restoring cached Node.js version
12:06:14 PM: v16.19.1 is already installed.
12:06:14 PM: Now using node v16.19.1 (npm v8.19.3)
12:06:14 PM: Enabling Node.js Corepack
12:06:14 PM: Started restoring cached build plugins
12:06:14 PM: Finished restoring cached build plugins
12:06:14 PM: Attempting Ruby version 2.7.2, read from environment
12:06:15 PM: Using Ruby version 2.7.2
12:06:15 PM: Using PHP version 8.0
12:06:15 PM: Started restoring cached corepack dependencies
12:06:15 PM: Finished restoring cached corepack dependencies
12:06:15 PM: No npm workspaces detected
12:06:15 PM: Started restoring cached node modules
12:06:15 PM: Finished restoring cached node modules
12:06:16 PM: Installing npm packages using npm version 8.19.3
12:06:19 PM: up to date, audited 705 packages in 4s
12:06:19 PM: 146 packages are looking for funding
12:06:19 PM:   run `npm fund` for details
12:06:19 PM: found 0 vulnerabilities
12:06:19 PM: npm packages installed
12:06:20 PM: Started restoring cached go cache
12:06:20 PM: Finished restoring cached go cache
12:06:20 PM: go version go1.19.6 linux/amd64
12:06:20 PM: Detected 1 framework(s)
12:06:20 PM: "next" at version "13.0.7"
12:06:20 PM: Installing missing commands
12:06:20 PM: Verify run directory
12:06:20 PM: Section completed: initializing
12:06:21 PM: ​
12:06:21 PM:   Netlify Build                                                 
12:06:21 PM: ────────────────────────────────────────────────────────────────
12:06:21 PM: ​
12:06:21 PM: ❯ Version
12:06:21 PM:   @netlify/build 29.5.7
12:06:21 PM: ​
12:06:21 PM: ❯ Flags
12:06:21 PM:   baseRelDir: true
12:06:21 PM:   buildId: 63ef274e8d61c20008e51893
12:06:21 PM:   deployId: 63ef274e8d61c20008e51895
12:06:21 PM: ​
12:06:21 PM: ❯ Current directory
12:06:21 PM:   /opt/build/repo/frontend
12:06:21 PM: ​
12:06:21 PM: ❯ Config file
12:06:21 PM:   /opt/build/repo/frontend/netlify.toml
12:06:21 PM: ​
12:06:21 PM: ❯ Context
12:06:21 PM:   production
12:06:21 PM: ​
12:06:21 PM: ❯ Using Next.js Runtime - v4.30.4
12:06:23 PM: ​
12:06:23 PM:   1. @netlify/plugin-nextjs (onPreBuild event)                  
12:06:23 PM: ────────────────────────────────────────────────────────────────
12:06:23 PM: ​
12:06:23 PM: Next.js cache restored.
12:06:23 PM: Netlify configuration property "build.environment.NEXT_PRIVATE_TARGET" value changed.
12:06:23 PM: ​
12:06:23 PM: (@netlify/plugin-nextjs onPreBuild completed in 112ms)
12:06:23 PM: ​
12:06:23 PM:   2. build.command from netlify.toml                            
12:06:23 PM: ────────────────────────────────────────────────────────────────
12:06:23 PM: ​
12:06:23 PM: $ npm run build
12:06:23 PM: > contentideas.io@0.1.0 build
12:06:23 PM: > next build
12:06:23 PM: info  - Linting and checking validity of types...
... (linting errors)
12:06:25 PM: info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
12:06:26 PM: info  - Creating an optimized production build...
12:06:27 PM: info  - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled
12:06:27 PM: info  - Using external babel configuration from /opt/build/repo/frontend/.babelrc
12:06:33 PM: info  - Compiled successfully
12:06:33 PM: info  - Collecting page data...
12:06:35 PM: info  - Generating static pages (0/104)
12:06:38 PM: info  - Generating static pages (26/104)
12:06:39 PM: info  - Generating static pages (52/104)
12:06:40 PM: info  - Generating static pages (78/104)
12:06:41 PM: info  - Generating static pages (104/104)
12:06:41 PM: info  - Finalizing page optimization...
12:06:41 PM: Route (pages)                                                 Size     First Load JS
12:06:41 PM: ┌ ○ / (4902 ms)                                               16.9 kB         252 kB
12:06:41 PM: ├   /_app                                                     0 B             221 kB
12:06:41 PM: ├ ○ /404                                                      1.52 kB         222 kB
12:06:41 PM: ├ ● /content-ideas/[tag] (ISR: 31536000 Seconds) (140577 ms)  697 B           294 kB
12:06:41 PM: ├   ├ /content-ideas/Visual Art & Design (5099 ms)
12:06:41 PM: ├   ├ /content-ideas/Lifehacks (5037 ms)
12:06:41 PM: ├   ├ /content-ideas/Sensitive Subjects (5001 ms)
12:06:41 PM: ├   ├ /content-ideas/Financial News (4999 ms)
12:06:41 PM: ├   ├ /content-ideas/Performing Arts (4995 ms)
12:06:41 PM: ├   ├ /content-ideas/Music & Audio (4986 ms)
12:06:41 PM: ├   ├ /content-ideas/Marketing (4941 ms)
12:06:41 PM: ├   └ [+93 more paths] (avg 1135 ms)
12:06:41 PM: └ ○ /search (4997 ms)                                         642 B           294 kB
12:06:41 PM: + First Load JS shared by all                                 227 kB
12:06:41 PM:   ├ chunks/framework-114634acb84f8baa.js                      45.4 kB
12:06:41 PM:   ├ chunks/main-c794e665648e50dd.js                           31.6 kB
12:06:41 PM:   ├ chunks/pages/_app-1dfe1c911809c911.js                     142 kB
12:06:41 PM:   ├ chunks/webpack-cb570c809b80e7fa.js                        1.92 kB
12:06:41 PM:   └ css/1dfbff27db3b6a47.css                                  6.34 kB
12:06:41 PM: ○  (Static)  automatically rendered as static HTML (uses no initial props)
12:06:41 PM: ●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
12:06:41 PM:    (ISR)     incremental static regeneration (uses revalidate in getStaticProps)
12:06:41 PM: ​
12:06:41 PM: (build.command completed in 18s)
12:06:41 PM: ​
12:06:41 PM:   3. @netlify/plugin-nextjs (onBuild event)                     
12:06:41 PM: ────────────────────────────────────────────────────────────────
12:06:41 PM: ​
12:06:41 PM: Patching /opt/build/repo/frontend/node_modules/next/dist/server/base-server.js
12:06:41 PM: Done
12:06:41 PM: Patching /opt/build/repo/frontend/node_modules/next/dist/server/next-server.js
12:06:41 PM: Done
12:06:41 PM: Moving static page files to serve from CDN...
12:06:41 PM: Moved 2 files
12:06:41 PM: Using Netlify Edge Functions for image format detection. Set env var "NEXT_DISABLE_EDGE_IMAGES=true" to disable.
12:06:41 PM: Netlify configuration property "redirects" value changed to [
12:06:41 PM:   { from: '/_next/static/*', to: '/static/:splat', status: 200 },
12:06:41 PM:   {
12:06:41 PM:     from: '/_next/image*',
12:06:41 PM:     query: { url: ':url', w: ':width', q: ':quality' },
12:06:41 PM:     to: '/_ipx/w_:width,q_:quality/:url',
12:06:41 PM:     status: 301
12:06:41 PM:   },
12:06:41 PM:   { from: '/_ipx/*', to: '/.netlify/builders/_ipx', status: 200 },
12:06:41 PM:   { from: '/cache/*', to: '/404.html', status: 404, force: true },
12:06:41 PM:   { from: '/server/*', to: '/404.html', status: 404, force: true },
12:06:41 PM:   { from: '/serverless/*', to: '/404.html', status: 404, force: true },
12:06:41 PM:   { from: '/trace', to: '/404.html', status: 404, force: true },
12:06:41 PM:   { from: '/traces', to: '/404.html', status: 404, force: true },
12:06:41 PM:   {
12:06:41 PM:     from: '/routes-manifest.json',
12:06:41 PM:     to: '/404.html',
12:06:41 PM:     status: 404,
12:06:41 PM:     force: true
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/build-manifest.json',
12:06:41 PM:     to: '/404.html',
12:06:41 PM:     status: 404,
12:06:41 PM:     force: true
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/prerender-manifest.json',
12:06:41 PM:     to: '/404.html',
12:06:41 PM:     status: 404,
12:06:41 PM:     force: true
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/react-loadable-manifest.json',
12:06:41 PM:     to: '/404.html',
12:06:41 PM:     status: 404,
12:06:41 PM:     force: true
12:06:41 PM:   },
12:06:41 PM:   { from: '/BUILD_ID', to: '/404.html', status: 404, force: true },
12:06:41 PM:   {
12:06:41 PM:     from: '/api/*',
12:06:41 PM:     to: '/.netlify/functions/___netlify-handler',
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/_redirects',
12:06:41 PM:     to: '/_redirects',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/favicon.ico',
12:06:41 PM:     to: '/favicon.ico',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/logo192.png',
12:06:41 PM:     to: '/logo192.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/logo512.png',
12:06:41 PM:     to: '/logo512.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/mainSlugBuildData.json',
12:06:41 PM:     to: '/mainSlugBuildData.json',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/manifest.json',
12:06:41 PM:     to: '/manifest.json',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/robots.txt',
12:06:41 PM:     to: '/robots.txt',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/font/Gilroy-Regular.ttf',
12:06:41 PM:     to: '/assets/font/Gilroy-Regular.ttf',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/font/Gilroy-SemiBold.ttf',
12:06:41 PM:     to: '/assets/font/Gilroy-SemiBold.ttf',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/content-ideas-logo-bold.png',
12:06:41 PM:     to: '/assets/img/content-ideas-logo-bold.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/content-ideas-logo-dark.png',
12:06:41 PM:     to: '/assets/img/content-ideas-logo-dark.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/content-ideas-logo.png',
12:06:41 PM:     to: '/assets/img/content-ideas-logo.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/content-studio-logo-dark.svg',
12:06:41 PM:     to: '/assets/img/content-studio-logo-dark.svg',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/content-studio-logo-default.svg',
12:06:41 PM:     to: '/assets/img/content-studio-logo-default.svg',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/contentideas-launch.png',
12:06:41 PM:     to: '/assets/img/contentideas-launch.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/contentstudio-logo.svg',
12:06:41 PM:     to: '/assets/img/contentstudio-logo.svg',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/cs-logo.png',
12:06:41 PM:     to: '/assets/img/cs-logo.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/logo.png',
12:06:41 PM:     to: '/assets/img/logo.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/no-results-available-icon.svg',
12:06:41 PM:     to: '/assets/img/no-results-available-icon.svg',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/scss/index.scss',
12:06:41 PM:     to: '/assets/scss/index.scss',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/homepage/Group 1.webp',
12:06:41 PM:     to: '/assets/img/homepage/Group 1.webp',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/homepage/Group 2.webp',
12:06:41 PM:     to: '/assets/img/homepage/Group 2.webp',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/homepage/Group 3.webp',
12:06:41 PM:     to: '/assets/img/homepage/Group 3.webp',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/homepage/Group 4.webp',
12:06:41 PM:     to: '/assets/img/homepage/Group 4.webp',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/homepage/Group 5.webp',
12:06:41 PM:     to: '/assets/img/homepage/Group 5.webp',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/homepage/Group 6.webp',
12:06:41 PM:     to: '/assets/img/homepage/Group 6.webp',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/homepage/Group 7.webp',
12:06:41 PM:     to: '/assets/img/homepage/Group 7.webp',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/homepage/Group 8.webp',
12:06:41 PM:     to: '/assets/img/homepage/Group 8.webp',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/homepage/Group 9.webp',
12:06:41 PM:     to: '/assets/img/homepage/Group 9.webp',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/homepage/Remove_Irrelevant.webp',
12:06:41 PM:     to: '/assets/img/homepage/Remove_Irrelevant.webp',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/homepage/Topics.webp',
12:06:41 PM:     to: '/assets/img/homepage/Topics.webp',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/modal/calendar.png',
12:06:41 PM:     to: '/assets/img/modal/calendar.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/modal/chat.png',
12:06:41 PM:     to: '/assets/img/modal/chat.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/modal/exclamation-triangle.png',
12:06:41 PM:     to: '/assets/img/modal/exclamation-triangle.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/modal/magnet.png',
12:06:41 PM:     to: '/assets/img/modal/magnet.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/modal/rss.png',
12:06:41 PM:     to: '/assets/img/modal/rss.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/modal/search.png',
12:06:41 PM:     to: '/assets/img/modal/search.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/modal/slack.png',
12:06:41 PM:     to: '/assets/img/modal/slack.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/assets/img/modal/spreadsheet.png',
12:06:41 PM:     to: '/assets/img/modal/spreadsheet.png',
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     status: 200
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/*',
12:06:41 PM:     to: '/.netlify/functions/___netlify-handler',
12:06:41 PM:     status: 200,
12:06:41 PM:     conditions: { Cookie: [Array] },
12:06:41 PM:     force: true
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/_next/data/k56w7YNI5JAWICUx2ToN7/content-ideas/Startups & VC.json',
12:06:41 PM:     to: '/.netlify/builders/___netlify-odb-handler',
12:06:41 PM:     status: 200,
12:06:41 PM:     force: true
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/content-ideas/Startups & VC',
12:06:41 PM:     to: '/.netlify/builders/___netlify-odb-handler',
12:06:41 PM:     status: 200,
12:06:41 PM:     force: true
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/_next/data/k56w7YNI5JAWICUx2ToN7/content-ideas/Machine Learning & AI.json',
12:06:41 PM:     to: '/.netlify/builders/___netlify-odb-handler',
12:06:41 PM:     status: 200,
12:06:41 PM:     force: true
12:06:41 PM:   },
12:06:41 PM:   {
12:06:41 PM:     from: '/content-ideas/Machine Learning & AI',
12:06:41 PM:     to: '/.netlify/builders/___netlify-odb-handler',
12:06:41 PM:     status: 200,
12:06:41 PM:     force: true
12:06:41 PM:   },
... (same topic stuff)
12:06:41 PM:   ... 161 more items
12:06:41 PM: ].
12:06:41 PM: ​
12:06:41 PM: (@netlify/plugin-nextjs onBuild completed in 103ms)
12:06:41 PM: ​
12:06:41 PM:   4. Functions bundling                                         
12:06:41 PM: ────────────────────────────────────────────────────────────────
12:06:41 PM: ​
12:06:41 PM: Packaging Functions from .netlify/functions-internal directory:
12:06:41 PM:  - ___netlify-handler/___netlify-handler.js
12:06:41 PM:  - ___netlify-odb-handler/___netlify-odb-handler.js
12:06:41 PM:  - _ipx/_ipx.js
12:06:41 PM: ​
12:06:59 PM: ​
12:06:59 PM: (Functions bundling completed in 17.7s)
12:06:59 PM: ​
12:06:59 PM:   5. Edge Functions bundling                                    
12:06:59 PM: ────────────────────────────────────────────────────────────────
12:06:59 PM: ​
12:06:59 PM: Packaging Edge Functions from .netlify/edge-functions directory:
12:06:59 PM:  - ipx
12:06:59 PM: ​
12:06:59 PM: (Edge Functions bundling completed in 799ms)
12:06:59 PM: ​
12:06:59 PM:   6. @netlify/plugin-nextjs (onPostBuild event)                 
12:06:59 PM: ────────────────────────────────────────────────────────────────
12:06:59 PM: ​
12:07:00 PM: Next.js cache saved.
12:07:00 PM: You have the following Netlify rewrite that might cause conflicts with the Next.js Runtime:
12:07:00 PM: 
12:07:00 PM: - /* /index.html 200For more information, see https://ntl.fyi/next-rewrites​
12:07:00 PM: (@netlify/plugin-nextjs onPostBuild completed in 112ms)
12:07:00 PM: ​
12:07:00 PM:   7. Deploy site                                                
12:07:00 PM: ────────────────────────────────────────────────────────────────
12:07:00 PM: ​
12:07:00 PM: Starting to deploy site from 'frontend/.next'
12:07:00 PM: Calculating files to upload
12:07:00 PM: 124 new files to upload
12:07:00 PM: 2 new functions to upload
12:07:00 PM: 0% complete
12:07:00 PM: 5% complete
12:07:00 PM: 10% complete
12:07:00 PM: 15% complete
12:07:00 PM: 20% complete
12:07:00 PM: 25% complete
12:07:00 PM: 30% complete
12:07:00 PM: 35% complete
12:07:00 PM: 40% complete
12:07:00 PM: 45% complete
12:07:00 PM: 50% complete
12:07:00 PM: 55% complete
12:07:00 PM: 60% complete
12:07:01 PM: 65% complete
12:07:01 PM: 70% complete
12:07:01 PM: 75% complete
12:07:01 PM: 80% complete
12:07:01 PM: 85% complete
12:07:01 PM: 90% complete
12:07:01 PM: 95% complete
12:07:01 PM: 100% complete
12:07:09 PM: Section completed: deploying
12:07:09 PM: Site deploy was successfully initiated
12:07:09 PM: ​
12:07:09 PM: Starting post processing
12:07:09 PM: (Deploy site completed in 9.7s)
12:07:09 PM: ​
12:07:09 PM:   Netlify Build Complete                                        
12:07:09 PM: ────────────────────────────────────────────────────────────────
12:07:09 PM: ​
12:07:10 PM: Post processing - HTML
12:07:09 PM: (Netlify Build completed in 48.1s)
12:07:10 PM: Caching artifacts
12:07:10 PM: Started saving node modules
12:07:10 PM: Finished saving node modules
12:07:10 PM: Started saving build plugins
12:07:10 PM: Finished saving build plugins
12:07:10 PM: Started saving corepack cache
12:07:10 PM: Finished saving corepack cache
12:07:10 PM: Started saving pip cache
12:07:10 PM: Finished saving pip cache
12:07:10 PM: Started saving emacs cask dependencies
12:07:10 PM: Finished saving emacs cask dependencies
12:07:10 PM: Started saving maven dependencies
12:07:10 PM: Finished saving maven dependencies
12:07:10 PM: Started saving boot dependencies
12:07:10 PM: Finished saving boot dependencies
12:07:10 PM: Started saving rust rustup cache
12:07:10 PM: Finished saving rust rustup cache
12:07:10 PM: Started saving go dependencies
12:07:10 PM: Finished saving go dependencies
12:07:10 PM: Build script success
12:07:10 PM: Section completed: building
12:07:11 PM: Uploading Cache of size 270.4MB
12:07:13 PM: Section completed: cleanup
12:07:13 PM: Finished processing build request in 1m8.264s
12:07:14 PM: Post processing - header rules
12:07:14 PM: Post processing - redirect rules
12:07:15 PM: Post processing done
12:07:15 PM: Section completed: postprocessing
12:07:16 PM: Site is live ✨

Here are my build settings

My scripts are as follows

"scripts": {
    "dev": "next dev",
    "start": "next start",
    "build": "next build",
    "lint": "next lint",
    "test": "next test"
  },

The site worked fine on netlify when I had the build command as next build && next export BUT export does not support ISR and I need that in my site now.

I’ll be happy to provide any other information. I can’t give a link to the repo as it is private Thanks!

Hiya, what have you tried so far

Hi, apologies for the late response. I have tried changing the build settings but I don’t think that was the right way to go. I have tried changing the build settings as follows

  1. command: next build, directory: frontend/.next (same no css build was shown)
  2. I have tried removing the build directory so next plugin would pick the correct one up automatically (threw an error about missing next directory)
  3. I have tried downloading the build folder to see if I could make sense of it but I am new to this so I did not know what I was looking for.

Something that crossed my mind is that I read this article and assumed the on Demand Builders mentioned in it is something Netlify automatically creates, but on reading it again now I think I was supposed to create one?
https://docs.netlify.com/integrations/frameworks/next-js/incremental-static-regeneration/

But even if I have not created and on demand builder, the site should only cause an issue on pages not already created, the pages that have been built should be served fine.

I have found the culprit. It turns out that the issue was with the netlify _redirects file in the public folder. I had the following line in it which was messing up my routing.

/* /index.html 200

Netlfiy also warned me about it in the onPostBuild event.
On removing the _redirects file, the site started working fine and so did ISR

1 Like

thank you for sharing your solution! This is definitely helpful for other users :+1:t5:

1 Like