# Deployment error - spawn ENAMETOOLONG

**URL:** <https://forum.serverless.com/t/deployment-error-spawn-enametoolong/14952>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [May 7, 2021, 5:53pm UTC](https://forum.serverless.com/t/deployment-error-spawn-enametoolong/14952 "2021-05-07T17:53:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PecoCaballero](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/pecocaballero/32/5689_2.png) [@PecoCaballero](https://forum.serverless.com/u/PecoCaballero)\
**Post date:** [May 7, 2021, 5:53pm UTC](https://forum.serverless.com/t/deployment-error-spawn-enametoolong/14952/1 "2021-05-07T17:53:46Z")

</div>

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;
```
