We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Nov 15, 2022 1:17 PM
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": {}
}
Dec 13, 2022 6:24 AM
@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
Nov 22, 2022 5:20 PM
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?
Nov 28, 2022 8:55 AM
Just trying to make a serverless function but using the new tools vs the old tools.