As per https://serverless.com/framework/docs/providers/aws/events/apigateway#configuring-endpoint-types
endpointType: REGIONAL
using that endpointType in the provider does the following:
Serverless: Packaging service…
Serverless: Excluding development dependencies…
Type Error ---------------------------------------------
validEndpointTypes.includes is not a function
Stack Trace --------------------------------------------
TypeError: validEndpointTypes.includes is not a function
at AwsCompileApigEvents.compileRestApi (/usr/local/lib/node_modules/serverless/lib/plugins/aws/package/compile/events/apiGateway/lib/restApi.js:26:31)
From previous event:
at Object.AwsCompileApigEvents.hooks.package:compileEvents [as hook] (/usr/local/lib/node_modules/serverless/lib/plugins/aws/package/compile/events/apiGateway/index.js:53:12)
at /usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:372:55
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:372:22)
at PluginManager.spawn (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:390:17)
at Deploy. (/usr/local/lib/node_modules/serverless/lib/plugins/deploy/deploy.js:123:50)
From previous event:
at Object.Deploy.hooks.before:deploy:deploy [as hook] (/usr/local/lib/node_modules/serverless/lib/plugins/deploy/deploy.js:113:10)
at /usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:372:55
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:372:22)
at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:403:17)
at /usr/local/lib/node_modules/serverless/lib/Serverless.js:102:33
at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:89:74)
at /usr/local/lib/node_modules/serverless/bin/serverless:42:50
Your Environment Information -----------------------------
OS: darwin
Node Version: 5.5.0
Serverless Version: 1.26.1
Any idea? running the latest version in Mac