微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决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 举报,一经查实,本站将立刻删除。