Netlify Function builds successfully but fails to deploy

Hi Netlify Support,

I am experiencing an issue with deploying a Netlify Function on my site. The function code builds and bundles correctly according to the build logs, but the deployment step consistently reports that 0 new functions were uploaded.

  • Site Name: verdant-salmiakki-60ef04
  • Function File: netlify/functions/quiz_submit.ts
  • Observed Problem: In my deployment logs, the “Functions bundling” section confirms that quiz_submit.ts is packaged into quiz_submit.zip. However, immediately following this, the “Deploy site” section states 0 new function(s) to upload.

This behavior persists even after attempting deploys with cleared cache.

Because the function is not being deployed, accessing its endpoint (/.netlify/functions/quiz_submit) on the live site results in a 500 Internal Server Error.

Could you please investigate why my bundled function file is not being included in the deployment upload step for this site?

: maria via Gemini
(I am NOT a programmer)

I think a key part of what it says is new function(s)
What happens when you change the function code and deploy again?
Or when you add a new function file that didn’t previously exist?

In general, Netlify’s systems don’t redeploy things that they determine haven’t changed between deploys.

As I understand it, clearing the cache clears the build cache.
It does not delete previously deployed files.

This would indicate to me that it is deployed, but that it’s encountering an error.
Check your Function logs to see what error:
https://docs.netlify.com/functions/logs/

Hey thanx…
it solved and then new problems arised…

Okay, I understand. Let’s get that message drafted for Netlify support.

Hi Netlify Support,

I am encountering a persistent issue with deploying a Netlify Function on my site where the function builds successfully but does not appear to be uploaded to the server during the deployment process.

  • Site Name: verdant-salmiakki-60ef04
  • Function File: netlify/functions/quiz_submit.ts
  • Problem Description: In my build logs, the “Functions bundling” step successfully packages the quiz_submit.ts file into a .zip archive. However, in the subsequent “Deploy site” section of the same log, it consistently states 0 new function(s) to upload.

This behavior prevents the function from being available on the live site, resulting in 404 Not Found or 500 Internal Server Error when accessing the function endpoint (/.netlify/functions/quiz_submit). This issue occurs even after attempting deploys with clear cache options.

The function code itself has been reviewed and appears correct for its intended purpose (logging data to Google Sheets). The problem seems to be specifically with the function upload step in the deployment pipeline.

Function log
Real-time
Filter by request ID, message, log level
May 12, 08:17:58 AM: Invalid Request Message

Could you please investigate why the bundled function file is not being included in the deployment upload process for my site?

Thanx!

: maria via Gemini

@MariadeBahia Gemini, most of this information is a repeat of previous information and does not assist.

Please keep communication to a minimum and provide only new information.

Repeating information does not help an adequately competent human to assist you, it just makes the information more difficult to parse and frankly wastes my time.

Additionally, these statements are highly likely to be wrong:

The function code itself has been reviewed and appears correct for its intended purpose (logging data to Google Sheets). The problem seems to be specifically with the function upload step in the deployment pipeline.

The issue remains most likely to be either:

  1. The function code itself (this will be proved by checking the function logs)
    or
  2. The Build Settings, (for example, perhaps the ‘Functions directory’ is set wrong)

If this is an attempt to provide information from the ‘Functions log’ it is truncated and useless…

If you want a human to provide suggestions/recommendations, you need to provide useful information.

Provide:

  • A full build log output
  • Full functions log output
  • The current build settings
  • A public repository for the project
    etc

@MariadeBahia If you provide better information to the AI, perhaps it might solve it too.

If there was a wider issue with Netlify’s system, I’d expect to see more reports of it on the forum.
Since there are no others, it’s much more likely you’re encountering an issue specific to your project.

Hey NathanMartin,

I am struggling as it is. This has been a 48 hour struggle from my side :frowning: Will provide you with all the logs.

: m

@MariadeBahia Just a couple of things to note:

  • This forum is for assistance only with Netlify’s systems
  • Netlify’s own staff operate to a Scope of Support
  • The Scope of Support means they won’t help with code issues
  • I don’t work for Netlify, I help primarily to prevent other users “getting stuck”

At this stage I’m interested in getting you to check and double-check things.
Challenge your assumptions and don’t believe AI responses at their face value.

I don’t provide free consultancy, so I’m not interested in helping to drive the AI for you via this forum.

Thanx for those notes.
Really appricated them.
:slight_smile:

And believe me, this Vibe-coding-AI-sheeet so much text and some plain wrongs but i would not be able to make it this far.

I have problem to get you all the logs since i get “acces denied” all the time. Will try to work around that by adding the resportory again.

Hang on…
: maria

Hi again,

Hope this will help!

https://verdant-salmiakki-60ef04.netlify.app/.netlify/functions/quiz_submit

Full function log output:
May 12, 12:34:42 PM: ERROR (node:9) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)May 12, 12:34:42 PM: c265cbf4 INFO Debugging Sheets Append Request:May 12, 12:34:42 PM: c265cbf4 INFO spreadsheetId: 15A6u-Mlf44yrNC4BZbXgJer5oigmGU9hKWl194C3VTS4May 12, 12:34:42 PM: c265cbf4 INFO range: Quiz Results!A:TMay 12, 12:34:42 PM: c265cbf4 INFO values being sent: [
[
‘2025-05-12T10:34:40.879Z’,
‘’,
‘’,
1,
0,
1,
3,
1,
0,
1,
2,
0,
1,
10,
‘Pappskalle’,
33,
67,
33,
‘1.2’,
‘’
]
]May 12, 12:34:42 PM: c265cbf4 INFO rowData content: [
‘2025-05-12T10:34:40.879Z’,
‘’,
‘’,
1,
0,
1,
3,
1,
0,
1,
2,
0,
1,
10,
‘Pappskalle’,
33,
67,
33,
‘1.2’,
‘’
]May 12, 12:34:42 PM: c265cbf4 ERROR Error processing quiz submission: Error: The incoming JSON object does not contain a client_email field
at _JWT.fromJSON (/var/task/netlify/functions/quiz_submit.js:10911:17)
at GoogleAuth.fromJSON (/var/task/netlify/functions/quiz_submit.js:13468:18)
at GoogleAuth._cacheClientFromJSON (/var/task/netlify/functions/quiz_submit.js:13483:29)
at GoogleAuth._GoogleAuth_determineClient2 (/var/task/netlify/functions/quiz_submit.js:13787:21)
at GoogleAuth.getClient (/var/task/netlify/functions/quiz_submit.js:13667:223)
at GoogleAuth.request (/var/task/netlify/functions/quiz_submit.js:13722:35)
at createAPIRequestAsync (/var/task/netlify/functions/quiz_submit.js:17276:29)
at async Runtime.handler (/var/task/netlify/functions/quiz_submit.js:586995:5)May 12, 12:34:42 PM: c265cbf4 Duration: 68.32 ms Memory Usage: 166 MBMay 12, 12:34:43 PM: fe59933f INFO Debugging Sheets Append Request:May 12, 12:34:43 PM: fe59933f INFO spreadsheetId: 15A6u-Mlf44yrNC4BZbXgJer5oigmGU9hKWl194C3VTS4May 12, 12:34:43 PM: fe59933f INFO range: Quiz Results!A:TMay 12, 12:34:43 PM: fe59933f INFO values being sent: [
[
‘2025-05-12T10:34:43.389Z’,
‘’,
‘’,
1,
0,
1,
3,
1,
0,
1,
2,
0,
1,
10,
‘Pappskalle’,
33,
67,
33,
‘1.2’,
‘’
]
]May 12, 12:34:43 PM: fe59933f INFO rowData content: [
‘2025-05-12T10:34:43.389Z’,
‘’,
‘’,
1,
0,
1,
3,
1,
0,
1,
2,
0,
1,
10,
‘Pappskalle’,
33,
67,
33,
‘1.2’,
‘’
]May 12, 12:34:43 PM: fe59933f ERROR Error processing quiz submission: Error: The incoming JSON object does not contain a client_email field
at _JWT.fromJSON (/var/task/netlify/functions/quiz_submit.js:10911:17)
at GoogleAuth.fromJSON (/var/task/netlify/functions/quiz_submit.js:13468:18)
at GoogleAuth._cacheClientFromJSON (/var/task/netlify/functions/quiz_submit.js:13483:29)
at GoogleAuth._GoogleAuth_determineClient2 (/var/task/netlify/functions/quiz_submit.js:13787:21)
at GoogleAuth.getClient (/var/task/netlify/functions/quiz_submit.js:13667:223)
at GoogleAuth.request (/var/task/netlify/functions/quiz_submit.js:13722:35)
at createAPIRequestAsync (/var/task/netlify/functions/quiz_submit.js:17276:29)
at async Runtime.handler (/var/task/netlify/functions/quiz_submit.js:586995:5)May 12, 12:34:43 PM: fe59933f Duration: 3.33 ms Memory Usage: 166 MBMay 12, 12:34:45 PM: d82e034a INFO Debugging Sheets Append Request:May 12, 12:34:45 PM: d82e034a INFO spreadsheetId: 15A6u-Mlf44yrNC4BZbXgJer5oigmGU9hKWl194C3VTS4May 12, 12:34:45 PM: d82e034a INFO range: Quiz Results!A:TMay 12, 12:34:45 PM: d82e034a INFO values being sent: [
[
‘2025-05-12T10:34:45.559Z’,
‘’,
‘’,
1,
0,
1,
3,
1,
0,
1,
2,
0,
1,
10,
‘Pappskalle’,
33,
67,
33,
‘1.2’,
‘’
]
]May 12, 12:34:45 PM: d82e034a INFO rowData content: [
‘2025-05-12T10:34:45.559Z’,
‘’,
‘’,
1,
0,
1,
3,
1,
0,
1,
2,
0,
1,
10,
‘Pappskalle’,
33,
67,
33,
‘1.2’,
‘’
]May 12, 12:34:45 PM: d82e034a ERROR Error processing quiz submission: Error: The incoming JSON object does not contain a client_email field
at _JWT.fromJSON (/var/task/netlify/functions/quiz_submit.js:10911:17)
at GoogleAuth.fromJSON (/var/task/netlify/functions/quiz_submit.js:13468:18)
at GoogleAuth._cacheClientFromJSON (/var/task/netlify/functions/quiz_submit.js:13483:29)
at GoogleAuth._GoogleAuth_determineClient2 (/var/task/netlify/functions/quiz_submit.js:13787:21)
at GoogleAuth.getClient (/var/task/netlify/functions/quiz_submit.js:13667:223)
at GoogleAuth.request (/var/task/netlify/functions/quiz_submit.js:13722:35)
at createAPIRequestAsync (/var/task/netlify/functions/quiz_submit.js:17276:29)
at async Runtime.handler (/var/task/netlify/functions/quiz_submit.js:586995:5)May 12, 12:34:45 PM: d82e034a Duration: 116.22 ms Memory Usage: 176 MBMay 12, 12:36:44 PM: 6554aca5 Duration: 76.62 ms Memory Usage: 177 MBMay 12, 12:36:44 PM: 3bb3e3d9 Duration: 7.29 ms Memory Usage: 177 MBMay 12, 12:36:44 PM: 056506c4 Duration: 3.04 ms Memory Usage: 177 MBMay 12, 12:36:45 PM: 8e1b5481 Duration: 3.47 ms Memory Usage: 177 MB

A public repository for the project

Build log output
12:34:08 PM: build-image version: 62cfa4823f1d25ccec52411acd49f2b7f4d09e4f (noble)
12:34:08 PM: buildbot version: 2d12f611f7941175e78a4e788e4c1d626145cd0f
12:34:08 PM: Building without cache
12:34:08 PM: Starting to prepare the repo for build
12:34:08 PM: No cached dependencies found. Cloning fresh repo
12:34:08 PM: git clone --filter=blob:none GitHub - mariadebahia/AI-beach-prepp-2025
12:34:09 PM: Preparing Git Reference refs/heads/vodka-rocks
12:34:10 PM: Starting to install dependencies
12:34:10 PM: Python version set to 3.13.3
12:34:10 PM: Ruby version set to 2.7.2
12:34:11 PM: mise go@1.19 install
12:34:11 PM: mise go@1.19 download go1.19.linux-amd64.tar.gz
12:34:12 PM: mise go@1.19 checksum go1.19.linux-amd64.tar.gz
12:34:12 PM: mise go@1.19 extract go1.19.linux-amd64.tar.gz
12:34:15 PM: mise go@1.19 go version
12:34:15 PM: mise go@1.19 go version go1.19 linux/amd64
12:34:15 PM: mise go@1.19 ✓ installed
12:34:15 PM: Go version set to 1.19
12:34:15 PM: Using PHP version 8.3
12:34:16 PM: v22.15.0 is already installed.
12:34:16 PM: Now using node v22.15.0 (npm v10.9.2)
12:34:16 PM: Enabling Node.js Corepack
12:34:17 PM: Started restoring cached build plugins
12:34:17 PM: Finished restoring cached build plugins
12:34:17 PM: Started restoring cached corepack dependencies
12:34:17 PM: Finished restoring cached corepack dependencies
12:34:17 PM: No npm workspaces detected
12:34:17 PM: Started restoring cached node modules
12:34:17 PM: Finished restoring cached node modules
12:34:17 PM: Installing npm packages using npm version 10.9.2
12:34:23 PM: added 333 packages, and audited 334 packages in 6s
12:34:23 PM: 79 packages are looking for funding
12:34:23 PM: run npm fund for details
12:34:23 PM: 6 vulnerabilities (1 low, 4 moderate, 1 high)
12:34:23 PM: To address all issues, run:
12:34:23 PM: npm audit fix
12:34:23 PM: Run npm audit for details.
12:34:23 PM: npm packages installed
12:34:23 PM: Successfully installed dependencies
12:34:23 PM: Starting build script
12:34:24 PM: Detected 1 framework(s)
12:34:24 PM: “vite” at version “5.4.8”
12:34:24 PM: Section completed: initializing
12:34:25 PM: ​
12:34:25 PM: Netlify Build
12:34:25 PM: ────────────────────────────────────────────────────────────────
12:34:25 PM: ​
12:34:25 PM: ❯ Version
12:34:25 PM: @netlify/build 32.1.3
12:34:25 PM: ​
12:34:25 PM: ❯ Flags
12:34:25 PM: accountId: 6817c8275e64680e8fad5d5d
12:34:25 PM: baseRelDir: true
12:34:25 PM: buildId: 6821ce9ff9e4f8b8a600cec3
12:34:25 PM: deployId: 6821ce9ff9e4f8b8a600cec5
12:34:25 PM: ​
12:34:25 PM: ❯ Current directory
12:34:25 PM: /opt/build/repo
12:34:25 PM: ​
12:34:25 PM: ❯ Config file
12:34:25 PM: /opt/build/repo/netlify.toml
12:34:25 PM: ​
12:34:25 PM: ❯ Context
12:34:25 PM: production
12:34:25 PM: ​
12:34:25 PM: build.command from netlify.toml
12:34:25 PM: ────────────────────────────────────────────────────────────────
12:34:25 PM: ​
12:34:25 PM: $ npm run build
12:34:26 PM: > vite-react-typescript-starter@0.0.0 build
12:34:26 PM: > vite build
12:34:26 PM: vite v5.4.8 building for production…
12:34:26 PM: transforming…
12:34:26 PM: Browserslist: caniuse-lite is outdated. Please run:
12:34:26 PM: npx update-browserslist-db@latest
12:34:26 PM: Why you should do it regularly: GitHub - browserslist/update-db: CLI tool to update caniuse-lite to refresh target browsers from Browserslist config
12:34:27 PM: ✓ 1481 modules transformed.
12:34:27 PM: rendering chunks…
12:34:27 PM: computing gzip size…
12:34:27 PM: dist/index.html 0.80 kB │ gzip: 0.49 kB
12:34:27 PM: dist/assets/index-Cgz9PgeF.css 20.96 kB │ gzip: 4.72 kB
12:34:27 PM: dist/assets/index-D5wu4pkK.js 172.34 kB │ gzip: 55.71 kB
12:34:27 PM: ✓ built in 1.73s
12:34:28 PM: ​
12:34:28 PM: (build.command completed in 2.2s)
12:34:28 PM: ​
12:34:28 PM: Functions bundling
12:34:28 PM: ────────────────────────────────────────────────────────────────
12:34:28 PM: ​
12:34:28 PM: Packaging Functions from netlify/functions directory:
12:34:28 PM: - quiz_submit.ts
12:34:28 PM: ​
12:34:28 PM: ▲ [WARNING] The value for “sideEffects” must be a boolean or an array [package.json]
12:34:28 PM: node_modules/googleapis/package.json:9:17:
12:34:28 PM: 9 │ “sideEffects”: “false”,
12:34:28 PM: ╵ ^
12:34:30 PM: Starting post processing
12:34:30 PM: Post processing - Forms
12:34:30 PM: Post processing - header rules
12:34:30 PM: Post processing - redirect rules
12:34:30 PM: Post processing done
12:34:30 PM: Section completed: postprocessing
12:34:31 PM: Site is live :sparkles:
12:34:30 PM: ​
12:34:30 PM: ❯ Functions bundled with warnings:
12:34:30 PM: - quiz_submit.zip
12:34:30 PM: ​
12:34:30 PM: (Functions bundling completed in 1.8s)
12:34:30 PM: ​
12:34:30 PM: Deploy site
12:34:30 PM: ────────────────────────────────────────────────────────────────
12:34:30 PM: ​
12:34:30 PM: Starting to deploy site from ‘dist’
12:34:30 PM: Calculating files to upload
12:34:30 PM: 0 new file(s) to upload
12:34:30 PM: 0 new function(s) to upload
12:34:30 PM: Section completed: deploying
12:34:30 PM: Site deploy was successfully initiated
12:34:30 PM: ​
12:34:30 PM: (Deploy site completed in 208ms)
12:34:30 PM: ​
12:34:30 PM: Netlify Build Complete
12:34:30 PM: ────────────────────────────────────────────────────────────────
12:34:30 PM: ​
12:34:30 PM: (Netlify Build completed in 4.4s)
12:34:30 PM: Caching artifacts
12:34:30 PM: Started saving node modules
12:34:30 PM: Finished saving node modules
12:34:30 PM: Started saving build plugins
12:34:30 PM: Finished saving build plugins
12:34:30 PM: Started saving go cache
12:34:30 PM: Finished saving go cache
12:34:30 PM: Started saving python cache
12:34:31 PM: Finished saving python cache
12:34:32 PM: Started saving ruby cache
12:34:37 PM: Finished saving ruby cache
12:34:37 PM: Started saving corepack cache
12:34:37 PM: Finished saving corepack cache
12:34:37 PM: Started saving emacs cask dependencies
12:34:37 PM: Finished saving emacs cask dependencies
12:34:37 PM: Started saving maven dependencies
12:34:37 PM: Finished saving maven dependencies
12:34:37 PM: Started saving boot dependencies
12:34:37 PM: Finished saving boot dependencies
12:34:37 PM: Started saving rust rustup cache
12:34:37 PM: Finished saving rust rustup cache
12:34:37 PM: Build script success
12:34:37 PM: Section completed: building
12:34:40 PM: Uploading Cache of size 241.0MB
12:34:41 PM: Section completed: cleanup
12:34:41 PM: Finished processing build request in 33.334s

@MariadeBahia When supplying code, please use a ‘Fenced Code Block’ as demonstrated here:
https://www.markdownguide.org/extended-syntax/#fenced-code-blocks

This will make it much easier for others to read.

You can see in the functions bundling that your function is found and bundled.
So the issue definitely isn’t as you originally raised:

It is bundled, it is deployed.

As I previously mentioned, it likely shows "0 new function(s) to upload" because the function is unchanged, and thus there are “no NEW functions to upload”.

We also have confirmation that it exists, because it’s generating errors as seen in the log, (which are to be expected since you’re seeing 500 error responses).

Specifically this appears to be your primary error:

May 12, 12:34:42 PM: c265cbf4 ERROR
Error processing quiz submission:
Error: The incoming JSON object does not contain a client_email field
at _JWT.fromJSON (/var/task/netlify/functions/quiz_submit.js:10911:17)
at GoogleAuth.fromJSON (/var/task/netlify/functions/quiz_submit.js:13468:18)
at GoogleAuth._cacheClientFromJSON (/var/task/netlify/functions/quiz_submit.js:13483:29)
at GoogleAuth._GoogleAuth_determineClient2 (/var/task/netlify/functions/quiz_submit.js:13787:21)
at GoogleAuth.getClient (/var/task/netlify/functions/quiz_submit.js:13667:223)
at GoogleAuth.request (/var/task/netlify/functions/quiz_submit.js:13722:35)
at createAPIRequestAsync (/var/task/netlify/functions/quiz_submit.js:17276:29)
at async Runtime.handler (/var/task/netlify/functions/quiz_submit.js:586995:5)

Your code references client_email here:

Do you have the necessary environment variables set in Netlify?