简体   繁体   中英

Maximum call stack size exceeded - aws-cdk

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');

    }
}

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM