I have an executable file called "Main" that I want to run in a node app on heroku. In order to do that I use this function
function run(code, params) {
const { execFileSync } = require('child_process');
const child = execFileSync('/app/Main', params ? [code, params] : [code], {
timeout: timeout * 1000,
cwd: __dirname,
stdio: 'pipe',
})
if (child.status === null) {
return `child status null`
}
return child.stdout.toString()
}
But it gives me this error back.
./Main: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory
I also receive this error when I run
heroku run bash -a "appname"
and then try to
./Main
Is there any way to work around this? From my experience, the heroku file system is very restricted and is mostly read only access. Can I somehow curl an older version to its correct place with a .profile or anything similar?