Hi,
I’m trying to deploy a lambda function using the nodejs-typescript template, but I’m hitting the following error:
Error: spawn ENAMETOOLONG
My function is only using dotenv and google-spreadsheet dependencies.
My serverless.ts file is the following:
import { Serverless } from ‘serverless/aws’;
const serverlessConfiguration: Serverless = {
service: {
name: 'delivery-scheduler',
// app and org for use with dashboard.serverless.com
// app: your-app-name,
// org: your-org-name,
},
frameworkVersion: '>=1.72.0',
custom: {
webpack: {
webpackConfig: './webpack.config.js',
includeModules: true
},
},
// Add the serverless-webpack plugin
plugins: ['serverless-webpack', 'serverless-offline'],
provider: {
memorySize: 2048,
name: 'aws',
runtime: 'nodejs12.x',
apiGateway: {
minimumCompressionSize: 1024,
},
environment: {
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1',
},
},
functions: {
scheduleDelivery: {
handler: 'handler.scheduleDelivery',
events: [
{
http: {
method: 'post',
path: 'scheduleDelivery',
}
}
]
}
}
}
module.exports = serverlessConfiguration;