I am getting "RangeError: Maximum call stack size exceeded" error on running a particular user code in vm.runInNewContext on each iteration of loop (given by the user).
I have checked this issue on StackOverflow (ref. Node.js - Maximum call stack size exceeded) and from there I found that we should wrap function call into setImmediate or process.nextTick. But, my entire project code is promisified.
Can anyone help here for any possible solution for this?
Thanks!