lambda-nodejs: RangeError: Maximum call stack size exceeded
See original GitHub issueIt seems there is some fundamental change in NodejsFunction
as it no longer behaves in the same way when bundling. Running existing unit tests produces a “Maximum call stack size exceeded” error.
Reproduction Steps
See example project at https://github.com/markusl/cdk-codepipeline-bitbucket-build-result-reporter/runs/1452010511 and https://github.com/markusl/cdk-ecr-image-scan-handler/runs/1452125431
FAIL test/index.test.ts (10.518 s)
✕ Create CodePipelineBitbucketBuildResultReporter (351 ms)
● Create CodePipelineBitbucketBuildResultReporter
RangeError: Maximum call stack size exceeded
at Array.sort (native)
What did you expect to happen?
Would expect bundling & tests to work just fine after upgrading.
Environment
- CDK CLI Version : 1.75.0 (build 7708242)
- Framework Version: 1.75.0
- Node.js Version: v14.15.0
- OS : macOS
- Language (Version): TypeScript 4
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:15 (12 by maintainers)
Top Results From Across the Web
aws lambda rangeerror: maximum call stack size exceeded
Show activity on this post. eventually, it was a node.js issue with spread operator: https://github.com/nodejs/node/issues/16870.
Read more >JavaScript RangeError: Maximum Call Stack Size Exceeded
The RangeError: Maximum call stack size exceeded is thrown when a function call is made that exceeds the call stack size. This can...
Read more >RangeError: Maximum call stack size exceeded - Educative.io
In this shot, we will see how to fix the “RangeError: Maximum call stack size exceeded” error. ... The most common source for...
Read more >Fixing "Maximum call stack size exceeded" in async Node.js ...
Fixing "Maximum call stack size exceeded" in async Node.js code ... I've happily used the async module for Node.js for years to simplify...
Read more >Maximum call stack size exceeded nodejs socket
RangeError : Maximum call stack size exceeded This is presumably because the node is trying to JSON encode the message so it can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@eladb @jogold I can second @matthias-pichler-warrify 's question. This is a regression from 1.74.0, which means we would happily accept a hotfix release that fixes the problem 😃
The problem here is that the issue does not make just
NodeJsFunction
unusable but the whole project.Why wasn’t this included in 1.76.0 ? 😞