How to deploy a serverless function in AWS lambda when using PNPM workspaces #6438
Unanswered
vibaiher-qatium
asked this question in
Q&A
Replies: 1 comment
-
@vibaiher-qatium what solution did you end up with? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
We have been using PNPM for a couple of months to build a monorepo. For now, we didn't included in our root workspace our lambda functions, but we were using already PNPM on them.
For deploying them, we were using this script:
After that, we zip the build folder and upload it to AWS. This wasn't an elegant solution, but it worked.
This script does not work now that we want to include those projects in the workspace, because the install command affects the root workspace node_modules folder. We tried several options, including pnpm deploy command, but we are not able to achieve to use it in combination with hoisted flag (AWS forces us to use a flat node_modules folder).
Is there something we are missing? Is it possible to include an option in deploy command to achieve that structure?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions