I’ve been trying for several hours to get my portfolio site to deploy. I keep getting page404 after trying solutions from multiple stackxchange forums and posts. I’ve configured the deploy settings, and the toml file as well. My site is also in a subdirectory.
For some reason, the site deploys, but I get a page404 error when I try to visit it.
Build log:
7:47:45 PM: build-image version: 4c0c1cadee6a31c9bb8d824514030009c4c05c6a (focal)
7:47:45 PM: build-image tag: v4.15.0
7:47:45 PM: buildbot version: 7f69cd6d63595b50ebbaee3c273db486f3eb0529
7:47:45 PM: Fetching cached dependencies
7:47:45 PM: Starting to download cache of 153.6MB
7:47:46 PM: Finished downloading cache in 789.564616ms
7:47:46 PM: Starting to extract cache
7:47:47 PM: Finished extracting cache in 1.145975661s
7:47:47 PM: Finished fetching cache in 1.982036984s
7:47:47 PM: Starting to prepare the repo for build
7:47:47 PM: Preparing Git Reference refs/heads/main
7:47:48 PM: Parsing package.json dependencies
7:47:49 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'debdevs-portfolio/.next' versus '.next' in the Netlify UI
7:47:49 PM: Section completed: initializing
7:47:49 PM: Starting build script
7:47:49 PM: Installing dependencies
7:47:49 PM: Python version set to 2.7
7:47:49 PM: Started restoring cached node version
7:47:50 PM: Finished restoring cached node version
7:47:50 PM: v16.18.1 is already installed.
7:47:50 PM: Now using node v16.18.1 (npm v8.19.2)
7:47:50 PM: Enabling node corepack
7:47:50 PM: Started restoring cached build plugins
7:47:50 PM: Finished restoring cached build plugins
7:47:51 PM: Attempting ruby version 2.7.2, read from environment
7:47:51 PM: Using ruby version 2.7.2
7:47:51 PM: Using PHP version 8.0
7:47:51 PM: No npm workspaces detected
7:47:51 PM: Started restoring cached node modules
7:47:51 PM: Finished restoring cached node modules
7:47:52 PM: Started restoring cached go cache
7:47:52 PM: Finished restoring cached go cache
7:47:53 PM: Installing Go version 1.19.3 (requested 1.19.x)
7:47:59 PM: unset GOOS;
7:47:59 PM: unset GOARCH;
7:47:59 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.19.3.linux.amd64';
7:47:59 PM: export PATH="/opt/buildhome/.gimme/versions/go1.19.3.linux.amd64/bin:${PATH}";
7:47:59 PM: go version >&2;
7:47:59 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.19.3.linux.amd64.env"
7:47:59 PM: go version go1.19.3 linux/amd64
7:47:59 PM: Detected 1 framework(s)
7:47:59 PM: "next" at version "12.3.1"
7:47:59 PM: Installing missing commands
7:47:59 PM: Verify run directory
7:48:00 PM:
7:48:00 PM: ────────────────────────────────────────────────────────────────
7:48:00 PM: Netlify Build
7:48:00 PM: ────────────────────────────────────────────────────────────────
7:48:00 PM:
7:48:00 PM: ❯ Version
7:48:00 PM: @netlify/build 28.4.4
7:48:00 PM:
7:48:00 PM: ❯ Flags
7:48:00 PM: baseRelDir: true
7:48:00 PM: buildId: 63894b2f6cf30d0008536798
7:48:00 PM: deployId: 63894b2f6cf30d000853679a
7:48:00 PM:
7:48:00 PM: ❯ Current directory
7:48:00 PM: /opt/build/repo/debdevs-portfolio
7:48:00 PM:
7:48:00 PM: ❯ Config file
7:48:00 PM: No config file was defined: using default values.
7:48:00 PM:
7:48:00 PM: ❯ Context
7:48:00 PM: production
7:48:00 PM:
7:48:00 PM: ────────────────────────────────────────────────────────────────
7:48:00 PM: 1. Build command from Netlify app
7:48:00 PM: ────────────────────────────────────────────────────────────────
7:48:00 PM:
7:48:00 PM: $ npm run build
7:48:01 PM: > debdevs-portfolio@0.1.0 build
7:48:01 PM: > next build
7:48:01 PM: warn - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
7:48:01 PM: info - Linting and checking validity of types...
7:48:02 PM: error - ESLint: Failed to load config "next/babel" to extend from. Referenced from: /opt/build/repo/debdevs-portfolio/.eslintrc.json
7:48:02 PM: info - Creating an optimized production build...
7:48:02 PM: info - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled
7:48:03 PM: info - Using external babel configuration from /opt/build/repo/debdevs-portfolio/.babelrc
7:48:12 PM: info - Compiled successfully
7:48:12 PM: info - Collecting page data...
7:48:13 PM: (node:2072) [DEP0128] DeprecationWarning: Invalid 'main' field in '/opt/build/repo/debdevs-portfolio/node_modules/react-icons/package.json' of 'lib'. Please either fix that or report it to the module author
7:48:13 PM: (Use `node --trace-deprecation ...` to show where the warning was created)
7:48:13 PM: (node:2086) [DEP0128] DeprecationWarning: Invalid 'main' field in '/opt/build/repo/debdevs-portfolio/node_modules/react-icons/package.json' of 'lib'. Please either fix that or report it to the module author
7:48:13 PM: (Use `node --trace-deprecation ...` to show where the warning was created)
7:48:15 PM: info - Generating static pages (0/10)
7:48:16 PM: (node:2107) [DEP0128] DeprecationWarning: Invalid 'main' field in '/opt/build/repo/debdevs-portfolio/node_modules/react-icons/package.json' of 'lib'. Please either fix that or report it to the module author
7:48:16 PM: (Use `node --trace-deprecation ...` to show where the warning was created)
7:48:16 PM: (node:2121) [DEP0128] DeprecationWarning: Invalid 'main' field in '/opt/build/repo/debdevs-portfolio/node_modules/react-icons/package.json' of 'lib'. Please either fix that or report it to the module author
7:48:16 PM: (Use `node --trace-deprecation ...` to show where the warning was created)
7:48:16 PM: info - Generating static pages (2/10)
7:48:16 PM: info - Generating static pages (4/10)
7:48:16 PM: info - Generating static pages (7/10)
7:48:16 PM: info - Generating static pages (10/10)
7:48:17 PM: info - Finalizing page optimization...
7:48:17 PM: Route (pages) Size First Load JS
7:48:17 PM: ┌ ○ / (786 ms) 3.04 kB 133 kB
7:48:17 PM: ├ └ css/cbe981be547f6993.css 2.62 kB
7:48:17 PM: ├ /_app 0 B 77.3 kB
7:48:17 PM: Creating deploy upload records
7:48:17 PM: ├ ● /[id] (2220 ms) 468 B 120 kB
7:48:17 PM: ├ ├ /1 (773 ms)
7:48:17 PM: ├ ├ /3 (739 ms)
7:48:17 PM: ├ └ /2 (708 ms)
7:48:17 PM: ├ ○ /404 2.64 kB 80 kB
7:48:17 PM: ├ ○ /about (696 ms) 6.11 kB 127 kB
7:48:17 PM: ├ └ css/4e4f5db9d47715dd.css 3.76 kB
7:48:17 PM: ├ λ /api/hello 0 B 77.3 kB
7:48:17 PM: ├ ● /index_export 2.92 kB 80.3 kB
7:48:17 PM: ├ ○ /portfolio (637 ms) 2.44 kB 132 kB
7:48:17 PM: ├ └ css/fc1f56e0d25c00f6.css 2.45 kB
7:48:17 PM: └ ○ /projects (803 ms) 525 B 120 kB
7:48:17 PM: + First Load JS shared by all 78.3 kB
7:48:17 PM: ├ chunks/framework-7751730b10fa0f74.js 45.5 kB
7:48:17 PM: ├ chunks/main-f6f0a96741df63e0.js 29.5 kB
7:48:17 PM: ├ chunks/pages/_app-d2c21ce9c640115a.js 568 B
7:48:17 PM: ├ chunks/webpack-b167acb8041ca46d.js 1.72 kB
7:48:17 PM: └ css/b1cd7057276e1b83.css 914 B
7:48:17 PM: λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
7:48:17 PM: ○ (Static) automatically rendered as static HTML (uses no initial props)
7:48:17 PM: ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
7:48:17 PM:
7:48:17 PM: (build.command completed in 16.6s)
7:48:17 PM:
7:48:17 PM: ────────────────────────────────────────────────────────────────
7:48:17 PM: 2. Deploy site
7:48:17 PM: ────────────────────────────────────────────────────────────────
7:48:17 PM:
7:48:17 PM: Starting to deploy site from 'debdevs-portfolio/.next'
7:48:17 PM: Creating deploy tree
7:48:17 PM: 26 new files to upload
7:48:17 PM: 0 new functions to upload
7:48:18 PM: Section completed: deploying
7:48:18 PM: Site deploy was successfully initiated
7:48:18 PM:
7:48:18 PM: (Deploy site completed in 1.1s)
7:48:18 PM:
7:48:18 PM: ────────────────────────────────────────────────────────────────
7:48:18 PM: Netlify Build Complete
7:48:18 PM: ────────────────────────────────────────────────────────────────
7:48:18 PM:
7:48:18 PM: (Netlify Build completed in 17.7s)
7:48:18 PM: Caching artifacts
7:48:18 PM: Started saving node modules
7:48:18 PM: Finished saving node modules
7:48:18 PM: Started saving build plugins
7:48:18 PM: Finished saving build plugins
7:48:18 PM: Started saving pip cache
7:48:18 PM: Finished saving pip cache
7:48:18 PM: Started saving emacs cask dependencies
7:48:19 PM: Starting post processing
7:48:18 PM: Finished saving emacs cask dependencies
7:48:18 PM: Started saving maven dependencies
7:48:18 PM: Finished saving maven dependencies
7:48:19 PM: Post processing - HTML
7:48:18 PM: Started saving boot dependencies
7:48:18 PM: Finished saving boot dependencies
7:48:18 PM: Started saving rust rustup cache
7:48:18 PM: Finished saving rust rustup cache
7:48:18 PM: Started saving go dependencies
7:48:18 PM: Finished saving go dependencies
7:48:18 PM: Build script success
7:48:18 PM: Section completed: building
7:48:19 PM: Uploading Cache of size 153.5MB
7:48:20 PM: Post processing - header rules
7:48:20 PM: Post processing - redirect rules
7:48:20 PM: Post processing done
7:48:20 PM: Section completed: cleanup
7:48:20 PM: Finished processing build request in 35.573430897s
7:48:20 PM: Section completed: postprocessing
7:48:23 PM: Site is live ✨
settings:
I’ve been trying a multitude of different solutions for hours. If anyone has any ideas on what the issue is or could point me in the right direction, I’ll take it.