# Having issue with sls deploy

**URL:** <https://forum.serverless.com/t/having-issue-with-sls-deploy/12362>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [August 24, 2020, 6:51am UTC](https://forum.serverless.com/t/having-issue-with-sls-deploy/12362 "2020-08-24T06:51:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tejas-webmavens](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tejas-webmavens](https://forum.serverless.com/u/tejas-webmavens)\
**Post date:** [August 24, 2020, 6:51am UTC](https://forum.serverless.com/t/having-issue-with-sls-deploy/12362/1 "2020-08-24T06:51:03Z")

</div>

I am using below dependencies and it works fine with sls offline. but when I try to deploy to aws lambda it gives me an Error: ENOENT: no such file or directory, lstat ‘{path\_to\_dir}/.webpack/.serverless’  
.serverless dir is created to ‘{path\_to\_dir}/.serverless’

“dependencies”: {  
“serverless-offline”: “^3.15.3”,  
“serverless-webpack”: “^2.2.2”,  
“webpack”: “^3.5.5”,  
“webpack-node-externals”: “^1.6.0”  
}

My webpack.conf.js is as below

var nodeExternals = require(‘webpack-node-externals’);

```
module.exports = {
    entry: './handler.js',
    // context: __dirname,
    node: {
        process:true,
        __filename: true,
        __dirname: true
    },
    target: 'node',
    module: {
        loaders: []
    },
    // output: {
    // libraryTarget: 'commonjs',
    // path: '.webpack',
    // filename: 'handler.js', // this should match the first part of function handler in serverless.yml
    // },
    externals: [nodeExternals()],
};
```
