You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI crashes with an uncaught exception when the input file is missing #894
Have you checked the docs for helpful APIs and examples?
Description
The built-in CLI (src/cli/cli.js, fxparser) crashes with an uncaught exception and a stack trace when the input file doesn't exist. It's supposed to print its Seems an invalid file or stream. message. The same happens when the -o output file can't be written.
The try/catch around fs.readFile can't catch the throw err inside the callback, because the callback runs after the try block has already returned. The fs.writeFile callback in writeToFile and the ReadToEnd.readToEnd stdin callback have the same problem.
Version: 5.11.2 (master at 80e88a8), Node.js v22.18.0
We're glad you find this project helpful. We'll try to address this issue ASAP. You can join Discord channel(https://discord.gg/X4Qp9u6Vz) for anonucements and pre release discussions. Don't forget to star this repo.
CLI has been separated and released as a separated package. What you see in this package an old version remained for the projects who have not transferred yet. Do you this bug on new package? If yes, then I can transfer this issue to that repository..
Thanks for the pointer. I checked fxp-cli and it doesn't have this crash, since processSingle awaits the read/write inside try/catch and exits with code 1. So there's no need to transfer the issue. I'll leave it to you whether #895 is worth merging for projects still on the built-in fxparser CLI; feel free to close both if not.
Activity
github-actions commentedon Oct 22, 2026
We're glad you find this project helpful. We'll try to address this issue ASAP. You can join Discord channel(https://discord.gg/X4Qp9u6Vz) for anonucements and pre release discussions. Don't forget to star this repo.
amitguptagwl commentedon Oct 27, 2026
CLI has been separated and released as a separated package. What you see in this package an old version remained for the projects who have not transferred yet. Do you this bug on new package? If yes, then I can transfer this issue to that repository..
troclaux commentedon Oct 27, 2026
Thanks for the pointer. I checked fxp-cli and it doesn't have this crash, since
processSingleawaits the read/write insidetry/catchand exits with code 1. So there's no need to transfer the issue. I'll leave it to you whether #895 is worth merging for projects still on the built-infxparserCLI; feel free to close both if not.