0

I am trying to create a project with multiple lambda functions to serve as an API. That's how the project structure looks like right now:

┣ src
┣ ┣ events
┣ ┣ filters
┣ ┣ interfaces
┣ ┣ lambdas
┣ ┃ ┗ assets
┣ ┃ ┃ ┣ tests
┣ ┃ ┃ ┗ app.ts
┣ ┣ lib
┣ ┣ server
┣ ┣ service
┣ ┣ validations
┣ ┣ .eslintignore
┣ ┣ .eslintrc.js
┣ ┣ .npmignore
┣ ┣ .prettierrc.js
┣ ┣ jest.config.ts
┣ ┣ package.json
┣ ┣ tsconfig.json
┗ ┗ yarn.lock
template.yaml

So basically I would have every function inside the lambdas folder However, when I try to build and access other modules such as server, services it doesn't allow me and it throws this error:

package.json file not found. Bundling source without dependencies. Error: NodejsNpmEsbuildBuilder:EsbuildBundle - Esbuild Failed: Cannot find esbuild. esbuild must be installed on the host machine to use this feature. It is recommended to be installed on the PATH, but can also be included as a project dependency.

Does anyone have any experience with this? I appreciate it

Jeff Goes
  • 571
  • 3
  • 7
  • 17
  • Does this answer your question? [AWS SAM - Esbuild Failed: cannot find esbuild](https://stackoverflow.com/questions/72557584/aws-sam-esbuild-failed-cannot-find-esbuild) – Salvino D'sa Oct 23 '22 at 15:25

0 Answers0