I am working on a NodeJS app that uses compiled executables to run C++ code. It takes command line arguments and works perfectly locally on Windows. I have read the post How to run an executable on Heroku from node, works locally , however, the problem is that the executable is created using an external C++ library (CGAL), and the C++ source code cannot be compiled on the heroku server without uploading all the dependencies for the library. To be more specific, I get the following error when I deploy to Heroku.
spawnSync /app/public/routes/my_executable.exe EACCES
NodeJS app runs the executable in the following way,
var exec = require('child_process').execFileSync; var fun = function(){ console.log("fun() start"); exec(path.join(__dirname, '/my_executable.exe'), [file.originalname], { cwd: __dirname }).toString()}).toString() };
I am unsure how to proceed forward with this. Any help would be appreciated.
https://stackoverflow.com/questions/67411292/how-to-run-compiled-executable-on-heroku-from-nodejs May 06, 2021 at 11:06AM
没有评论:
发表评论