Serverless Repo Not Deploying All Functions

I am creating a series of functions that utilize the gmail client and have working code locally and done pretty substantial testing to verify it would work in a remote environment also. I currently have a serverless.json file defined as:

{
 "runtime": "nodejs20.x", 
 "version": "1.0",
 "secrets": [
 "my_secret"
 ],
 "endpoints": {
 "gmail/gmail-event": {
 "method": "POST",
 "file": "gmail-event.js"
 },
 "gmail/gmail-watch": {
 "method": "GET",
 "file": "gmail-watch.js"
 },
 "gmail/gmail-label": {
 "method": "GET",
 "file": "gmail-label.js"
 }
 }
}

This is my local folder structure:


My local folder structure
This is my structure after hs upload to design manager:


My Design Manager structure after upload

When I run my CICD pipeline utilizing hubspot cli npm package to upload my functions to CMS filemanager I see that all of my files successfully upload and my reflected code changes are present. However, when I run my ‘hs functions list --json’ I only see my gmail-events.js file has been created as a serverless endpoint function. Ive attempted to delete the folder structure from design manager and re-upload but no matter what I always get the same results. Im confident my serverless.json is correct so Im left scratching my head as to why my remaining two functions are not being configured as endpoints when uploaded.
I should also note that I use webpack to bundle my dependencies into a single .js file. Is it possible my file size is too large after being bundled?

Hi, @afretwell :waving_hand: Welcome to our community. Thank you very much for taking the time to make a detailed post. I’d like to ask some of our community experts if they have any related experience — hey @ChrisoKlepke @JBrake @Teun @Mike_Eastwood do you have any suggestions for @afretwell? Or thoughts on how they might troubleshoot this?

Thank you very much for taking a look! — Jaycee

I think your serverless.json file needs to reside in the root of your functions file, which means the paths to the endpoint files will need to be updated. Also check that this is the only serverless.json file in the portal, if not you may need to update your endpoint names to get the endpoint you are expecting. Endpoints are not theme specific but portal specific. You dont need a path in the endpoint name either, if that makes a difference.

 "endpoints": {
 "gmail/gmail-event": {
 "method": "POST",
 "file": "gmail-event.js"
 }
}

becomes (where serverless.json is in the root of the functions folder)

 "endpoints": {
 "gmail-event": {
 "method": "POST",
 "file": "gmail/gmail.functions/gmail-event.js"
 }
}

Also check all the secrets you are using are listed in serverless.json
If you are using github for deployment, check there are no files excpetions that may prevent files from being deployed.
I usually follow the HS recomendation for serverless functions setup but I can see anything that standouts with the way you have implemented this that would be a problem apart from the above mentions.
Jonathan