Angular 12节点:3224未处理的PromiseRejectionWarning:错误:映射无效:

问题描述

在我的 Angular 项目中,当我尝试使用命令 ng extract-i18n --output-path src/translate 生成翻译文件时,出现以下错误消息:

\ Generating browser application bundles (phase: building)...(node:3224) UnhandledPromiseRejectionWarning: Error: Invalid mapping: {"generated":{"line":1
21955,"column":0},"source":"webpack://./node_modules/packages/reactive-form-validators/decorators/alpha.decorator.ts","original":{"line":7,"column":-16},"name":null}
    at SourceMapGenerator_validateMapping [as _validateMapping] (C:\Users\user\Documents\workspace xxx\pjtv0-front-end\node_modules\webpack\node_modul
es\source-map\lib\source-map-generator.js:298:13)
    at SourceMapGenerator_addMapping [as addMapping] (C:\Users\user\Documents\workspace xxx\pjtv0-front-end\node_modules\webpack\node_modules\source-m
ap\lib\source-map-generator.js:110:12)
    at C:\Users\user\Documents\workspace xxx\pjtv0-front-end\node_modules\webpack\node_modules\source-map\lib\source-node.js:351:13
    at SourceNode_walk [as walk] (C:\Users\user\Documents\workspace xxx\pjtv0-front-end\node_modules\webpack\node_modules\source-map\lib\source-node.j
s:230:9)
    at SourceNode_walk [as walk] (C:\Users\user\Documents\workspace xxx\pjtv0-front-end\node_modules\webpack\node_modules\source-map\lib\source-node.j
s:226:13)
    at SourceNode_walk [as walk] (C:\Users\user\Documents\workspace xxx\pjtv0-front-end\node_modules\webpack\node_modules\source-map\lib\source-node.j
s:226:13)
    at SourceNode_walk [as walk] (C:\Users\user\Documents\workspace xxx\pjtv0-front-end\node_modules\webpack\node_modules\source-map\lib\source-node.j
s:226:13)
    at SourceNode_walk [as walk] (C:\Users\user\Documents\workspace xxx\pjtv0-front-end\node_modules\webpack\node_modules\source-map\lib\source-node.j
s:226:13)
    at SourceNode_walk [as walk] (C:\Users\user\Documents\workspace xxx\pjtv0-front-end\node_modules\webpack\node_modules\source-map\lib\source-node.j
s:226:13)
    at SourceNode_toStringWithSourceMap [as toStringWithSourceMap] (C:\Users\user\Documents\workspace xxx\pjtv0-front-end\node_modules\webpack\node_mo
dules\source-map\lib\source-node.js:342:8)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3224) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a
 catch block,or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection,use the CLI fl
ag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3224) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future,promise rejections that are not handled will termin
ate the Node.js process with a non-zero exit code.
| Generating browser application bundles (phase: sealing)...

我已经将 angular 模块更新到最新版本,npm 修复不能解决问题。你有什么想法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)