Note that there are some explanatory texts on larger screens.

plurals
  1. POexecSync with meteor
    text
    copied!<p>I am trying to use the <code>execSync</code> package to get synchronous shell functionality. Although I initially had problems due to the lack of the <code>binding.node</code> file, I solved it by running <code>node-gyp</code> in proper <code>execSync</code> directories. Now, I can call <code>execSync</code> functions within node without any problems. </p> <p>However, when I try to use the functions from within meteor, I get the following error:</p> <pre><code>Running on: http://localhost:3000/ /usr/lib/meteor/bin/node: symbol lookup error: /home/onur/node_modules/execSync/node_modules/ffi/node_modules/ref/build/Release/binding.node: undefined symbol: _ZNK2v85Value6IsNullEv Exited with code: 127 Your application is crashing. Waiting for file change. </code></pre> <p><strong>Note:</strong></p> <p>A quick inspection over the net showed that the symbol belongs to the V8 library.</p> <p><strong>The Code</strong></p> <p>I define the following in <code>Meteor.methods</code>.</p> <pre><code>getpuzzle: function (clu, lo, hi) { var require = _meteor_bootstrap__.require; var exec = require('execSync'); var sudoku_str = exec.stdout(path_sudoku_gen+" "+clu+" "+lo+" "+hi); console.log(sudoku_str); return sudoku_str; } </code></pre> <p>I am trying to figure out the interaction between the server and client. Basically, I'm trying to do <a href="http://www.scriptol.com/javascript/nodejs-php.php" rel="nofollow">this</a>. The function on the client side requires a string that is returned by a python script executed on the server side. I tried a dirty hack using a global variable, but it still did not matter because the script is run asynchronously. Can I do this without synchronous execution? I cannot fully grasp the model for client-server interaction, so if there is a right way to do it, feel free to correct me. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload