Trying to have a custom code as part of lambda layer. However when trying to import the same inside a lambda function getting an error. The layer works fine if i remove the serverless-bundle.
Error:
[OperationalError: ENOENT: no such file or directory, lstat '/services/xyz/.webpack/dependencies/node_modules'] {
cause: [Error: ENOENT: no such file or directory, lstat '/services/xyz/.webpack/dependencies/node_modules'] {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/services/xyz/.webpack/dependencies/node_modules'
},
isOperational: true,
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/services/xyz/.webpack/dependencies/node_modules'
}