Error: Debug Failure. Output generation failed when running formatjs extract

2.6k views Asked by At

When running formatjs extract this is what we got. From the stack trace it seems that the issue is from formatjs themselves. Feel like I am stuck on what the issue is here.

$ formatjs extract './src/**/*.{js,ts,tsx}' --out-file './src/i18n/messages/messages.json' --extract-from-format-message-call --throws
Error: Debug Failure. Output generation failed
    at Object.transpileModule (/Users/.../node_modules/@formatjs/cli/node_modules/typescript/lib/typescript.js:126894:29)
    at processFile (/Users/.../node_modules/@formatjs/cli/src/extract.js:104:39)
    at /Users/.../node_modules/@formatjs/cli/src/extract.js:163:59
    at step (/Users/.../node_modules/@formatjs/cli/src/extract.js:44:23)
    at Object.next (/Users/.../node_modules/@formatjs/cli/src/extract.js:25:53)
    at fulfilled (/Users/.../node_modules/@formatjs/cli/src/extract.js:16:58)
error Command failed with exit code 1.
1

There are 1 answers

0
Josh Unger On

You might be processing a file that needs to be ignored using --ignore. Can you upgrade to the latest version and re-run your command? Long added the filename in this commit https://github.com/formatjs/formatjs/commit/ceb0bf8a58c13fe6811bc35191018ee1c431484a

Reference: https://github.com/formatjs/formatjs/issues/2044