esbuild with only single top level package.json #7290
Unanswered
kiranpradeep
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was following this blog which recommends multiple lambdas using single a top-level package.json with esbuild. But that way, I was not able to run
sam build
without installing esbuild globally. To demonstrate I created an MCVE sam [project] with 2 node.js lambdas sharing a single top-level package.json. I could successfully build this project in the below 2 ways.sam build
npm run build
(package.json build script then runssam build
)But if I just run

sam build
it gives an error as in the below screenshot. Is there a way to directly runsam build
with esbuild only being an npm dependency?Beta Was this translation helpful? Give feedback.
All reactions