Astro site gets 500 error but there is no errors in the build or deploy

I have many working sites on netlify, but a new site that I just published recently and was working yesterday, is now giving an error.

HTTP ERROR 500

“This page isn’t working tangerine-salmiakki-a76b40.netlify.app is currently unable to handle this request.”

There is a custom domain called www.flivideo.com

  • Build problems? Link or paste the FULL build log & build settings screenshot

Deploy Log

7:02:14 AM: build-image version: d55944c047ef0aee2ac01971edde72cb2a50acfe (focal)
7:02:14 AM: build-image tag: v4.16.1
7:02:14 AM: buildbot version: 0be68edd034c744ad79b207db44f42646b4e8ecb
7:02:14 AM: Fetching cached dependencies
7:02:14 AM: Starting to download cache of 98.7MB
7:02:15 AM: Finished downloading cache in 1.071877869s
7:02:15 AM: Starting to extract cache
7:02:16 AM: Finished extracting cache in 855.463606ms
7:02:16 AM: Finished fetching cache in 1.963453025s
7:02:16 AM: Starting to prepare the repo for build
7:02:16 AM: Preparing Git Reference refs/heads/main
7:02:16 AM: Parsing package.json dependencies
7:02:18 AM: Starting build script
7:02:18 AM: Installing dependencies
7:02:18 AM: Python version set to 2.7
7:02:18 AM: Started restoring cached node version
7:02:19 AM: Finished restoring cached node version
7:02:19 AM: v16.19.0 is already installed.
7:02:19 AM: Now using node v16.19.0 (npm v8.19.3)
7:02:19 AM: Enabling node corepack
7:02:19 AM: Started restoring cached build plugins
7:02:19 AM: Finished restoring cached build plugins
7:02:20 AM: Attempting ruby version 2.7.2, read from environment
7:02:20 AM: Using ruby version 2.7.2
7:02:20 AM: Using PHP version 8.0
7:02:21 AM: No pnpm workspaces detected
7:02:21 AM: Started restoring cached node modules
7:02:21 AM: Finished restoring cached node modules
7:02:21 AM: Installing NPM modules using PNPM version 7.13.4
7:02:21 AM: Lockfile is up to date, resolution step is skipped
7:02:21 AM: Already up to date
7:02:21 AM: Done in 629ms
7:02:21 AM: NPM modules installed using PNPM
7:02:22 AM: Started restoring cached go cache
7:02:22 AM: Finished restoring cached go cache
7:02:23 AM: go version go1.19.4 linux/amd64
7:02:23 AM: Detected 1 framework(s)
7:02:23 AM: "astro" at version "1.7.2"
7:02:23 AM: Installing missing commands
7:02:23 AM: Verify run directory
7:02:23 AM: Section completed: initializing
7:02:24 AM: ​
7:02:24 AM:   Netlify Build                                                 
7:02:24 AM: ────────────────────────────────────────────────────────────────
7:02:24 AM: ​
7:02:24 AM: ❯ Version
7:02:24 AM:   @netlify/build 29.2.1
7:02:24 AM: ​
7:02:24 AM: ❯ Flags
7:02:24 AM:   baseRelDir: true
7:02:24 AM:   buildId: 63acd902b69cc200085f0434
7:02:24 AM:   deployId: 63acd902b69cc200085f0436
7:02:24 AM: ​
7:02:24 AM: ❯ Current directory
7:02:24 AM:   /opt/build/repo
7:02:24 AM: ​
7:02:24 AM: ❯ Config file
7:02:24 AM:   No config file was defined: using default values.
7:02:24 AM: ​
7:02:24 AM: ❯ Context
7:02:24 AM:   production
7:02:24 AM: ​
7:02:24 AM:   1. Build command from Netlify app                             
7:02:24 AM: ────────────────────────────────────────────────────────────────
7:02:24 AM: ​
7:02:24 AM: $ astro build
7:02:26 AM: 12:02:26 AM [build] output target: server
7:02:26 AM: 12:02:26 AM [build] deploy adapter: @astrojs/netlify/functions
7:02:26 AM: 12:02:26 AM [build] Collecting build info...
7:02:26 AM: 12:02:26 AM [build] Completed in 371ms.
7:02:26 AM: 12:02:26 AM [build] Building server entrypoints...
7:02:29 AM: 12:02:29 AM [build] Completed in 2.42s.
7:02:29 AM: 
7:02:29 AM:  finalizing server assets 
7:02:29 AM: 12:02:29 AM [build] Rearranging server assets...
7:02:29 AM: 12:02:29 AM [build] Server built in 2.80s
7:02:29 AM: 12:02:29 AM [build] Complete!
7:02:29 AM: ​
7:02:29 AM: (build.command completed in 4.2s)
7:02:29 AM: ​
7:02:29 AM:   2. Functions bundling                                         
7:02:29 AM: ────────────────────────────────────────────────────────────────
7:02:29 AM: ​
7:02:29 AM: Packaging Functions from .netlify/functions-internal directory:
7:02:29 AM:  - entry.mjs
7:02:29 AM: ​
7:02:29 AM: ​
7:02:29 AM: ❯ The following Node.js modules use dynamic expressions to include files:
7:02:29 AM:    - astro
7:02:29 AM: ​
7:02:29 AM:   Because files included with dynamic expressions aren't bundled with your serverless functions by default,  this may result in an error when invoking a function. To resolve this error, you can mark these Node.js
7:02:29 AM:   modules as external in the [functions] section of your `netlify.toml` configuration file:
7:02:29 AM: ​
7:02:29 AM:   [functions]
7:02:29 AM:     external_node_modules = ["astro"]
7:02:29 AM: ​
7:02:29 AM:   Visit https://ntl.fyi/dynamic-imports for more information.
7:02:29 AM: ​
7:02:29 AM: ​
7:02:29 AM: (Functions bundling completed in 285ms)
7:02:29 AM: ​
7:02:29 AM:   3. Deploy site                                                
7:02:29 AM: ────────────────────────────────────────────────────────────────
7:02:29 AM: ​
7:02:29 AM: Starting to deploy site from 'dist'
7:02:29 AM: Creating deploy tree 
7:02:29 AM: 0 new files to upload
7:02:29 AM: 1 new functions to upload
7:02:35 AM: Section completed: deploying
7:02:35 AM: Site deploy was successfully initiated
7:02:35 AM: ​
7:02:35 AM: Starting post processing
7:02:35 AM: (Deploy site completed in 6.4s)
7:02:35 AM: ​
7:02:35 AM:   Netlify Build Complete                                        
7:02:35 AM: Post processing - HTML
7:02:35 AM: ────────────────────────────────────────────────────────────────
7:02:35 AM: ​
7:02:35 AM: (Netlify Build completed in 10.9s)
7:02:36 AM: Post processing - header rules
7:02:36 AM: Caching artifacts
7:02:36 AM: Started saving node modules
7:02:36 AM: Finished saving node modules
7:02:36 AM: Post processing - redirect rules
7:02:36 AM: Started saving build plugins
7:02:36 AM: Finished saving build plugins
7:02:36 AM: Started saving pip cache
7:02:36 AM: Finished saving pip cache
7:02:36 AM: Post processing done
7:02:36 AM: Started saving emacs cask dependencies
7:02:36 AM: Finished saving emacs cask dependencies
7:02:36 AM: Section completed: postprocessing
7:02:36 AM: Started saving maven dependencies
7:02:36 AM: Finished saving maven dependencies
7:02:36 AM: Started saving boot dependencies
7:02:36 AM: Finished saving boot dependencies
7:02:36 AM: Started saving rust rustup cache
7:02:36 AM: Finished saving rust rustup cache
7:02:36 AM: Started saving go dependencies
7:02:36 AM: Finished saving go dependencies
7:02:36 AM: Build script success
7:02:36 AM: Section completed: building
7:02:36 AM: Uploading Cache of size 98.6MB
7:02:37 AM: Section completed: cleanup
7:02:37 AM: Finished processing build request in 23.298998497s
7:02:39 AM: Site is live ✨

Your Function logs can be helpful:

Error:

Dec 29, 08:12:31 PM: bf9ddb99 ERROR  02:42:31 PM [ssr] TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:372:5)
    at URL.onParseError (node:internal/url:553:9)
    at new URL (node:internal/url:629:5)
    at basePagePath (/var/task/.netlify/functions-internal/entry.js:22858:10)
    at topicNavigationPath (/var/task/.netlify/functions-internal/entry.js:22851:49)
    at topicNavigation (/var/task/.netlify/functions-internal/entry.js:22838:22)
    at /var/task/.netlify/functions-internal/entry.js:23386:28
    at renderToString2 (/var/task/.netlify/functions-internal/entry.js:21217:31)
    at renderJSXVNode2 (/var/task/.netlify/functions-internal/entry.js:21955:38)
    at renderJSX2 (/var/task/.netlify/functions-internal/entry.js:21934:10) (x2)

That function is being generated by Astro, so it you’re not sure how to debug it, it’s worth reaching out to them.

I’m happy to debug this code, but I can’t see how you even found this log?

Here is a screenshot of the deploy and there is no indication in the deploy of a problem and there is no link to a the Functions Log that you mention.

Where do I find this?

I have tried running the netlify dev locally and that did not report any issue.

npm install netlify-cli -g
netlify dev --targetPort 3003

Finally found the function logs through this grey piece of text.

This was a totally confusing user interface experience.

I had already linked you to it:

It won’t, because it simply proxies Astro’s dev server.

1 Like