• Live group demo of Marketing Hub + Data Agent

    Standardize reporting, reduce manual work, and introduce AI without cleanup

    Join us on March 12
  • Marketing that's efficient and human? That's Loop Marketing.

    Explore HubSpot Academy's 39-video playlist and put it into practice.

    Start learning

Missing Required Serverless JSON Properties

LeeBartelme
HubSpot Employee
HubSpot Employee

The docuemntation displays this code for an example serverless.json file:

// A serverless.json file configured
// for an API endpoint function

{
  "runtime": "nodejs12.x",
  "version": "1.0",
  "endpoints": {
    "path/to/endpoint": {
      "file": "githubUserFunction.js"
    }
  }
}

That exact code fails to build unless you add a appFunctions property. It can be an empty object, but it must exist.

// A serverless.json file configured
// for an API endpoint function

{
  "runtime": "nodejs12.x",
  "version": "1.0",
  "endpoints": {
    "path/to/endpoint": {
      "file": "githubUserFunction.js"
    }
  },
  "appFunctions": {}
}
0 Upvotes
3 Replies 3
CosminM
Participant | Platinum Partner
Participant | Platinum Partner

@LeeBartelme thank you for including the solution as well.  I ran into the same issue while creating an endpoint using the new HS dev tools

0 Upvotes
sejal_parikh
HubSpot Product Team
HubSpot Product Team

Thanks, Lee, this is an interesting observation. We will discuss this internally and get back on it. 

 

I notice that you have tried to use the endpoint function. Would you tell me what use case you use it for?

0 Upvotes
LeeBartelme
HubSpot Employee
HubSpot Employee

Just trying to make a serverless function but using the new tools vs the old tools.

0 Upvotes