Skip to content

(lambda-nodejs): add support for monorepos #18175

@mikestopcontinues

Description

@mikestopcontinues

What is the problem?

Rolling my codebase up in a monorepo, I found that trying to build a NodejsFunction, I get the following error:

Usage Error: Couldn't find a script named "esbuild".

I'm using the following settings in .yarnrc.yml, which hoists all my node_modules to my monorepo root:

nmMode: hardlinks-global
nodeLinker: node-modules

Reproduction Steps

Here's a repro.

What did you expect to happen?

I expected it to work.

What actually happened?

Usage Error: Couldn't find a script named "esbuild".

CDK CLI Version

2.3.0 (build beaa5b2)

Framework Version

2.3.0

Node.js Version

v14.18.1

OS

OSX 12.0.1 (21A559)

Language

Typescript

Language Version

4.5.4

Other information

Happy holidays! 😁

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions