I get an error when exec is called in a Meteor application. Maximum call stack size undefined

This is a complete error:

Internal exception during message processing { msg: 'method', method: 'myServerMethod', params: [], id: '4' }Maximum call stack size undefined

Meteor.methods
  myServerMethod: ->
    cmd = 'pwd'
    exec cmd, (err, stdout, stderr) ->

I could not, for my life, know why I was getting this error. I also tried this on two different machines.

What do i need to check?

+4
source share
1 answer

This error usually indicates that your method is trying to return something that is not EJSON-capable , so if it is not on this list, then why do you get an error. In particular, you cannot return the cursor; you need to fetchget the results and return them.

+6

All Articles