Serverless deploy/offline doesn't work with Node.js + Database #11026
joaocasarin
started this conversation in
General
Replies: 2 comments 7 replies
-
When the esbuild plugin tries to bundle your code it faces an error that blocks deployment:
Have you tried solving that? Any idea why |
Beta Was this translation helpful? Give feedback.
3 replies
-
Hi, I faced almost the same problem. In my case was the I don't know if this will solve your problem, but you can give it a try. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Are you certain it's a bug?
Is the issue caused by a plugin?
Are you using the latest version?
Is there an existing issue for this?
Issue description
EDIT.: Reproducible repo: https://github.com/joaocasarin/aws-lambda-typeorm-error
How to: just follow the README for both branches main(typeorm) and prisma(prisma).
So, Whenever I try to
serverless deploy
- so this is not a plugin related, orserverless offline
- this is run by a plugin, but deploy doesn't work as well -, and there is some kind of code that connects and/or interacts with a database, such as the usage of an ORM like Typeorm or Prisma for Node.js, I get these errors, and they are cause when I call this function (just an example):Service configuration (serverless.yml) content
Command name and used flags
serverless deploy
Command output
Environment information
Running "serverless" from node_modules Framework Core: 3.14.0 (local) 3.14.0 (global) Plugin: 6.2.1 SDK: 4.3.2
Beta Was this translation helpful? Give feedback.
All reactions