serverless-plugin-typescript icon indicating copy to clipboard operation
serverless-plugin-typescript copied to clipboard

Updates instruction to install source-map-support as regular dependency

Open arturopie opened this issue 4 years ago • 1 comments

source-map-support is imported inside the function, so I don't think it should be installed as a dev dependency.

If I install source-map-support as a dev dependency, and invoke the function on AWS Lambda, I get the following error Runtime.ImportModuleError: Error: Cannot find module 'source-map-support/register'

I'm new to Serverless and Typescript, so I might be completely mistaken here. Let me know.

arturopie avatar Jul 12 '20 12:07 arturopie

@arturopie This tripped me up today. Thanks for logging the issue, this definitely needs to be updated.

I moved source-map-support from dev dependency to the dependency and that fixed the problem for me. Cheers!

dimadesu avatar Aug 16 '21 05:08 dimadesu