Hi,
I’ve tried reviewing the forum posts on the topic, and have tried multiple approaches and variations to try make this work.
Using Cursor with Claude 3.7 Sonnet max and have tried it with Gemini 2.5 Pro as well, both LLM’s reviewing each other’s code. Tried it with Bolt.new as well, can’t get it to work.
It seems to be an issue with the netlify astro adaptor and using functions. The code works fine in local dev environment, and appears to deploy succesfully, but then I always get the 404 page not found.
Note this was working fine before I changed the code to be SSR (using Supabase authentication). I’ve triple checked the .env on netlify. Can’t see an issue.
Page not found
Looks like you’ve followed a broken link or entered a URL that doesn’t exist on this site.
If this is your site, and you weren’t expecting a 404 for this path, please visit Netlify’s “page not found” support guide for troubleshooting tips.
Website Address:
(https://portal.flowpath.co.nz/)
Site information
Site name
flowpath-portal-10
Owner
careysenior’s team
Site ID
a50c18d9-d346-4437-be6c-8ff305178a46
Created
Feb 24 at 3:03 PM
Last update
Today at 11:59 AM
-
Published deploy for flowpath-portal-10
-
Today at 11:57 AM, by
careysenior on GitHubwithAstro -
Production: main@48f1f4e
-
Your site is linked to a Git repository for continuous deployment.
-
Current repository
1 Lambda function actively running in production.
BUILD LOG
11:58:21 AM: build-image version: 69179d37c92919bcf501ca9a8de95762ede3ffc5 (noble)
11:58:21 AM: buildbot version: 648e870c693a8227febba2139caf43dd78353ae3
11:58:21 AM: Fetching cached dependencies
11:58:21 AM: Starting to download cache of 498.6MB
11:58:22 AM: Finished downloading cache in 1.529s
11:58:22 AM: Starting to extract cache
11:58:31 AM: Finished extracting cache in 8.186s
11:58:31 AM: Finished fetching cache in 9.822s
11:58:31 AM: Starting to prepare the repo for build
11:58:31 AM: Preparing Git Reference refs/heads/main
11:58:33 AM: Starting to install dependencies
11:58:33 AM: Started restoring cached mise cache
11:58:36 AM: Finished restoring cached mise cache
11:58:36 AM: Python version set to 3.13.2
11:58:36 AM: Ruby version set to 2.7.2
11:58:37 AM: Go version set to 1.19
11:58:37 AM: Using PHP version 8.3
11:58:38 AM: Started restoring cached Node.js version
11:58:39 AM: Finished restoring cached Node.js version
11:58:39 AM: v22.14.0 is already installed.
11:58:39 AM: Now using node v22.14.0 (npm v10.9.2)
11:58:39 AM: Enabling Node.js Corepack
11:58:39 AM: Started restoring cached build plugins
11:58:39 AM: Finished restoring cached build plugins
11:58:39 AM: Started restoring cached corepack dependencies
11:58:39 AM: Finished restoring cached corepack dependencies
11:58:39 AM: No npm workspaces detected
11:58:39 AM: Started restoring cached node modules
11:58:39 AM: Finished restoring cached node modules
11:58:39 AM: Installing npm packages using npm version 10.9.2
11:58:41 AM: up to date, audited 473 packages in 1s
11:58:41 AM: 175 packages are looking for funding
11:58:41 AM: run npm fund
for details
11:58:41 AM: 4 vulnerabilities (3 moderate, 1 high)
11:58:41 AM: To address issues that do not require attention, run:
11:58:41 AM: npm audit fix
11:58:41 AM: Some issues need review, and may require choosing
11:58:41 AM: a different dependency.
11:58:41 AM: Run npm audit
for details.
11:58:41 AM: npm packages installed
11:58:41 AM: Successfully installed dependencies
11:58:41 AM: Starting build script
11:58:42 AM: Detected 1 framework(s)
11:58:42 AM: “astro” at version “5.6.1”
11:58:42 AM: Section completed: initializing
11:58:44 AM:
11:58:44 AM: Netlify Build
11:58:44 AM: ────────────────────────────────────────────────────────────────
11:58:44 AM:
11:58:44 AM: ❯ Version
11:58:44 AM: @netlify/build 31.0.2
11:58:44 AM:
11:58:44 AM: ❯ Flags
11:58:44 AM: accountId: 67b462bce83cebe0db6a9e2e
11:58:44 AM: baseRelDir: true
11:58:44 AM: buildId: 67fc4f8280625d0008141aaf
11:58:44 AM: deployId: 67fc4f8280625d0008141ab1
11:58:44 AM:
11:58:44 AM: ❯ Current directory
11:58:44 AM: /opt/build/repo
11:58:44 AM:
11:58:44 AM: ❯ Config file
11:58:44 AM: /opt/build/repo/netlify.toml
11:58:44 AM:
11:58:44 AM: ❯ Context
11:58:44 AM: production
11:58:44 AM:
11:58:44 AM: build.command from netlify.toml
11:58:44 AM: ────────────────────────────────────────────────────────────────
11:58:44 AM:
11:58:44 AM: $ npm run build
11:58:44 AM: > Flowpath-Portal-1.0@0.0.1 build
11:58:44 AM: > astro build
11:58:45 AM: 23:58:45 [content] Syncing content
11:58:45 AM: 23:58:45 [content] Synced content
11:58:45 AM: 23:58:45 [types] Generated 33ms
11:58:45 AM: 23:58:45 [build] output: “server”
11:58:45 AM: 23:58:45 [build] mode: “server”
11:58:45 AM: 23:58:45 [build] directory: /opt/build/repo/dist/
11:58:45 AM: 23:58:45 [build] adapter: @astrojs/netlify
11:58:45 AM: 23:58:45 [build] Collecting build info…
11:58:45 AM: 23:58:45 [build] ✓ Completed in 95ms.
11:58:45 AM: 23:58:45 [build] Building server entrypoints…
11:58:46 AM: 23:58:46 [vite] ✓ built in 1.72s
11:58:46 AM: 23:58:46 [build] ✓ Completed in 1.75s.
11:58:46 AM: building client (vite)
11:58:46 AM: 23:58:46 [vite] transforming…
11:58:49 AM: 23:58:49 [vite] ✓ 1562 modules transformed.
11:58:49 AM: 23:58:49 [vite] rendering chunks…
11:58:49 AM: 23:58:49 [vite] computing gzip size…
11:58:49 AM: 23:58:49 [vite] dist/_astro/PrintButton.CgU6NCev.js 0.17 kB │ gzip: 0.15 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/Header.BB4kkVzI.js 0.23 kB │ gzip: 0.18 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/calculator.astro_astro_type_script_index_0_lang.BRxgJ_9o.js 0.25 kB │ gzip: 0.20 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/browser.zqqb17Yq.js 0.35 kB │ gzip: 0.28 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/supabase.BA0mERuR.js 0.42 kB │ gzip: 0.36 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/_commonjsHelpers.gnU0ypJ3.js 0.61 kB │ gzip: 0.33 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/preload-helper.CLcXU_4U.js 0.99 kB │ gzip: 0.60 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/jsx-runtime.CX9_ZRIA.js 1.00 kB │ gzip: 0.62 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/PrintButton.Dv441wJ8.js 1.88 kB │ gzip: 0.95 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/Layout.astro_astro_type_script_index_0_lang.CpJObvV-.js 1.89 kB │ gzip: 0.79 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/TP108_Chart_Figure5.Qkd0AHlo.js 3.79 kB │ gzip: 1.53 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/test-detention-save.astro_astro_type_script_index_0_lang.74z4Ls4H.js 4.11 kB │ gzip: 1.83 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/index.3-1WsM3T.js 6.89 kB │ gzip: 2.78 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/RainfallCalculator.astro_astro_type_script_index_0_lang.BmPMgUlD.js 7.22 kB │ gzip: 2.81 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/authStore.QZCG-cA6.js 7.96 kB │ gzip: 3.10 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/TP108Calculator.astro_astro_type_script_index_0_lang.CxtewsF9.js 10.42 kB │ gzip: 3.24 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/DetentionCalcSaveLoad.astro_astro_type_script_index_0_lang.BFIIzi-r.js 14.54 kB │ gzip: 3.80 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/index.BjxPzTmF.js 107.87 kB │ gzip: 29.77 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/client.BcwTRG3w.js 136.53 kB │ gzip: 44.04 kB
11:58:49 AM: 23:58:49 [vite] dist/_astro/CivilEngineeringPortal.B5rhFxS7.js 371.27 kB │ gzip: 127.02 kB
11:58:49 AM: 23:58:49 [vite] ✓ built in 2.53s
11:58:49 AM: prerendering static routes
11:58:49 AM: 23:58:49 ✓ Completed in 20ms.
11:58:49 AM:
11:58:49 AM: 23:58:49 [build] Rearranging server assets…
11:58:49 AM: 23:58:49 [@astrojs/netlify] Emitted _redirects
11:58:49 AM: 23:58:49 [@astrojs/netlify] Bundling function ../../../build/entry.mjs
11:58:51 AM: 23:58:51 [@astrojs/netlify] Generated SSR Function
11:58:51 AM: 23:58:51 [build] Server built in 6.08s
11:58:51 AM: 23:58:51 [build] Complete!
11:58:51 AM:
11:58:51 AM: (build.command completed in 7s)
11:58:51 AM:
11:58:51 AM: Functions bundling
11:58:51 AM: ────────────────────────────────────────────────────────────────
11:58:51 AM:
11:58:51 AM: The Netlify Functions setting targets a non-existing directory: .netlify/functions
11:58:51 AM: Packaging Functions generated by your framework:
11:58:51 AM: - ssr/ssr.mjs
11:58:51 AM:
11:58:51 AM:
11:58:51 AM: (Functions bundling completed in 415ms)
11:58:52 AM:
11:58:52 AM: Deploy site
11:58:52 AM: ────────────────────────────────────────────────────────────────
11:58:52 AM:
11:58:52 AM: Starting to deploy site from ‘dist’
11:58:52 AM: Calculating files to upload
11:58:52 AM: 0 new file(s) to upload
11:58:52 AM: 1 new function(s) to upload
11:58:59 AM: Post processing - header rules
11:58:59 AM: Post processing - Forms
11:58:59 AM: Post processing - redirect rules
11:58:59 AM: Starting post processing
11:58:59 AM: Post processing done
11:58:59 AM: Section completed: postprocessing
11:58:59 AM: Section completed: deploying
11:58:59 AM: Site deploy was successfully initiated
11:58:59 AM:
11:58:59 AM: (Deploy site completed in 6.7s)
11:58:59 AM:
11:58:59 AM: Netlify Build Complete
11:58:59 AM: ────────────────────────────────────────────────────────────────
11:58:59 AM:
11:58:59 AM: (Netlify Build completed in 15s)
11:58:59 AM: Caching artifacts
11:58:59 AM: Started saving node modules
11:58:59 AM: Finished saving node modules
11:58:59 AM: Started saving build plugins
11:58:59 AM: Finished saving build plugins
11:58:59 AM: Started saving mise cache
11:58:59 AM: Finished saving mise cache
11:58:59 AM: Started saving corepack cache
11:58:59 AM: Finished saving corepack cache
11:58:59 AM: Started saving emacs cask dependencies
11:58:59 AM: Finished saving emacs cask dependencies
11:58:59 AM: Started saving maven dependencies
11:58:59 AM: Finished saving maven dependencies
11:58:59 AM: Started saving boot dependencies
11:58:59 AM: Finished saving boot dependencies
11:58:59 AM: Started saving rust rustup cache
11:58:59 AM: Finished saving rust rustup cache
11:58:59 AM: Build script success
11:58:59 AM: Section completed: building
11:59:00 AM: Site is live
11:59:34 AM: Uploading Cache of size 498.6MB
11:59:36 AM: Section completed: cleanup
11:59:36 AM: Finished processing build request in 1m15.021s