question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

lambda-nodejs: RangeError: Maximum call stack size exceeded

See original GitHub issue

It 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:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:15 (12 by maintainers)

github_iconTop GitHub Comments

4reactions
markuslcommented, Dec 2, 2020

@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.

3reactions
matthias-pichler-warrifycommented, Dec 1, 2020

Why wasn’t this included in 1.76.0 ? 😞

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found