Dependency Injection not working when using serverless-esbuild plugin
See original GitHub issueHello,
I’ve encountered that weirdly dependency injection breaks(Nest.js project) when attempting to use serverless-esbuild
in local environment. However when attempting to use serverless-webpack
it’s all working fine.
serverless-offline@8.3.1 serverless-esbuild@1.23.3 serverless@2.72.2 serverless-webpack@5.6.0
custom:
serverless-offline:
httpPort: 4000
lambdaPort: 4001
esbuild:
bundle: true
minify: false
platform: 'node'
external:
- "cache-manager"
- "class-transformer"
- "class-validator"
- "@nestjs/microservices"
- "@nestjs/websockets/socket-module"
- "fastify-swagger"
watch:
pattern: ['src/**/*.ts']
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Esbuild - Serverless Framework: Plugins
Serverless plugin for zero-config JavaScript and TypeScript code bundling using promising fast & furious esbuild bundler and minifier.
Read more >Plugins - esbuild
Plugins. The plugin API allows you to inject code into various parts of the build process. Unlike the rest of the API, it's...
Read more >How We Sped Up Our TypeScript Serverless Builds Ten ...
We are using decorators, but emitting decorator metadata is not supported by esbuild. We fixed a bug and submitted a PR to the...
Read more >serverless/serverless - Gitter
I installed serverless with npm i -g serverless. Now I want to generate a project to run on Azure. npm i -g serverless-azure-functions...
Read more >serverless AWS deployment fails because of esbuild
If you are installing with npm, you can try ensuring that both npm and node are not running under Rosetta 2 and then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Update: Using
esbuild-plugin-ts-decorators
and plugins option in serverless.yaml actually made it work. Thanks for the help @vinicius91carvalho 😃I used
@anatine/esbuild-decorators
plugin as this example here: https://docs.serverless-stack.com/constructs/Function, and it solved the problem.