CRM Development Tools Beta

LeeBartelme
HubSpot Employee
HubSpot Employee

Missing Required Serverless JSON Properties

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

Missing Required Serverless JSON Properties

@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

Missing Required Serverless JSON Properties

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

Missing Required Serverless JSON Properties

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

0 Upvotes