Maximum call stack size exceeded - aws-cdk

Viewed 1457

Getting the below error while running any cdk cli command:

Maximum call stack size exceeded
(node:46265) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 beforeExit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
Subprocess exited with error 1

sample code using cdk cli against:

import { Stack, Construct, StackProps } from '@aws-cdk/core';
import * as s3 from '@aws-cdk/aws-s3'

export class MyFirstS3Stack extends Stack {
    constructor(scope: Construct, id: string, props?: StackProps) {
        super(scope,id,props);

        new s3.Bucket(this,'MyFirstBucket');

    }
}
1 Answers

I was able to resolve the above issue, after deleting the old compiled js files for above construct. I have re-complied with the above file and everything started working again.

Related