当运行 formatjs extract 这就是我们得到的。从堆栈跟踪看来,问题出在 formatjs 本身。感觉就像我被困在这里的问题所在。
$ 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.