You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using serverless with typescript/webpack, all the code is being compiled into .webpack folder on my machine but the way the lambda function is being invoked, it is not looking into .webpack folder.
Error: Cannot find module '/Users/garegin/Projects/myproj/src/functions/s3-event-listener'
Require stack:
/Users/garegin/Projects/myproj/node_modules/serverless/bin/serverless.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.resolve (internal/modules/cjs/helpers.js:94:19)
at InProcessRunner.run (/Users/garegin/Projects/myproj/node_modules/serverless-s3-local/node_modules/serverless-offline/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js:140:18)
at HandlerRunner.run (/Users/garegin/Projects/myproj/node_modules/serverless-s3-local/node_modules/serverless-offline/dist/lambda/handler-runner/HandlerRunner.js:177:64)
at LambdaFunction.runHandler (/Users/garegin/Projects/myproj/node_modules/serverless-s3-local/node_modules/serverless-offline/dist/lambda/LambdaFunction.js:355:20)
The text was updated successfully, but these errors were encountered:
gghukasyan
changed the title
Getting Error: Cannot find module when with with serverless-webpack s3 event lambda invokation.
Getting Error: Cannot find module when used with serverless-webpack s3 event lambda invokation.
May 25, 2021
When using serverless with typescript/webpack, all the code is being compiled into .webpack folder on my machine but the way the lambda function is being invoked, it is not looking into .webpack folder.
Error: Cannot find module '/Users/garegin/Projects/myproj/src/functions/s3-event-listener'
Require stack:
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.resolve (internal/modules/cjs/helpers.js:94:19)
at InProcessRunner.run (/Users/garegin/Projects/myproj/node_modules/serverless-s3-local/node_modules/serverless-offline/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js:140:18)
at HandlerRunner.run (/Users/garegin/Projects/myproj/node_modules/serverless-s3-local/node_modules/serverless-offline/dist/lambda/handler-runner/HandlerRunner.js:177:64)
at LambdaFunction.runHandler (/Users/garegin/Projects/myproj/node_modules/serverless-s3-local/node_modules/serverless-offline/dist/lambda/LambdaFunction.js:355:20)
The text was updated successfully, but these errors were encountered: