Can i call out to a system program?

I want to exec a pandoc command. I would need to install pandoc and then call it from node.js api somehow. Is this possible or does vercel not allow system exe calls?

1 Like

Anyone know the answer?

1 Like

Vercel does not allow arbitrary system executable calls, including pandoc, because Vercel is serverless. Its serverless functions run in a sandboxed environment with limited runtime access, so you can’t run exec() or spawn() to call system-level binaries like pandoc, unless they are part of the runtime or bundled statically with your app.

I am not up-to-date with fluid compute and all the stuff Vercel has done recently, so wait for staff to answer before accepting what I said above. :smiley:

In a similar predicament I had with FFMPEG, I used WebAssembly. Below are some resources that might help with WASM (WebAssembly) if the Vercel team confirms you can’t execute pandoc in a serverless environment.

You can probably run WASM on a serverless function, but if the task is long-running (over 60 seconds) you should:

  • Run it client-side (cheap for you, might be annoying for users)
  • Run it on a separate backend server as an API (not cheap for you, but good UX)
1 Like