-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(lambda-nodejs): add support for monorepos #18175
Comments
I've encountered this error before, as well. It's a bit confusing, but you need to have |
Proposed documentation update here: #18216 |
Really awesome, @blimmer. Thanks! Gonna leave this open, as I think it still qualifies as a bug. |
esbuild
in root - Couldn't find a script named "esbuild"
I am unassigning and marking this issue as We use +1s to help prioritize our work, and are happy to revaluate this issue based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for reprioritization. |
|
Closes aws#18175 - see aws#18175 (comment) for details. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Closes aws#18175 - see aws#18175 (comment) for details. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
@mikestopcontinues would it be possible to spin up the repo again for solution inspiration? :) |
@vleandersson It would take a little too long to gut the private stuff while preserving the useful bits. I don't use CDK pipelines because I started before they existed. I can offer some tips though:
I'm happy to answer any other questions you have! |
@mikestopcontinues what I am struggling with at the moment is that |
I added info about the single lockfile to the docs: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs-readme.html#reference-project-architecture From my experience, this works great for yarn monorepos! |
Thanks for your input @blimmer and @mikestopcontinues ! I'll have a look at adding some info on this in the docs as well once I have a final solution up :) |
Related issue: evanw/esbuild#884 |
Issue raised with aws #21161 |
With yarn PnP see also #19452 . I've found it necessary to use the node-modules linker for now. |
@blimmer yeah, I saw that. Great insights. Thanks! Sadly |
Hi all, from this issue, it's not clear what the ask is for supporting monorepos with |
|
What is the problem?
Rolling my codebase up in a monorepo, I found that trying to build a
NodejsFunction
, I get the following error:I'm using the following settings in
.yarnrc.yml
, which hoists all my node_modules to my monorepo root:Reproduction Steps
Here's a repro.
What did you expect to happen?
I expected it to work.
What actually happened?
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! 😁
The text was updated successfully, but these errors were encountered: