我刚从v8升级到13角。(将所有角度依赖项设置为13.0.2) (将节点版本更新为12.20.2)。当我尝试服务时,我会得到以下NGCC失败的错误
Error: Error on worker #1: TypeError: ts24.isNamedTupleMember is not a function
at StaticInterpreter.visitType (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:3340:21)
at StaticInterpreter.visitVariableDeclaration (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:3027:36)
at StaticInterpreter.visitDeclaration (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:3006:19)
at StaticInterpreter.visitAmbiguousDeclaration (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:3085:165)
at StaticInterpreter.visitIdentifier (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:2989:25)
at StaticInterpreter.visitExpression (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:2882:21)
at StaticInterpreter.visitObjectLiteralExpression (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:2934:28)
at StaticInterpreter.visitExpression (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:2880:21)
at StaticInterpreter.visitArrayLiteralExpression (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:2920:25)
at StaticInterpreter.visitExpression (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:2894:21)
at ClusterMaster.onWorkerMessage (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/main-ngcc.js:5139:15)
at file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/main-ngcc.js:5049:72
at EventEmitter.<anonymous> (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/main-ngcc.js:5207:15)
at EventEmitter.emit (events.js:314:20)
at Worker.<anonymous> (internal/cluster/master.js:174:13)
at Worker.emit (events.js:314:20)
at ChildProcess.<anonymous> (internal/cluster/worker.js:32:12)
at ChildProcess.emit (events.js:314:20)
at emit (internal/child_process.js:877:12)
at processTicksAndRejections (internal/process/task_queues.js:85:21)
(node:25668) UnhandledPromiseRejectionWarning: Error: NGCC failed.
at NgccProcessor.process (/Users/k28483/Documents/WORK/MAP/periscope/node_modules/@ngtools/webpack/src/ngcc_processor.js:146:19)
at /Users/k28483/Documents/WORK/MAP/periscope/node_modules/@ngtools/webpack/src/ivy/plugin.js:141:27
at Hook.eval [as call] (eval at create (/Users/k28483/Documents/WORK/MAP/periscope/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:30:1)
at Hook.CALL_DELEGATE [as _call] (/Users/k28483/Documents/WORK/MAP/periscope/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/Users/k28483/Documents/WORK/MAP/periscope/node_modules/webpack/lib/Compiler.js:1054:30)
at /Users/k28483/Documents/WORK/MAP/periscope/node_modules/webpack/lib/Compiler.js:1099:29
at eval (eval at create (/Users/k28483/Documents/WORK/MAP/periscope/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:18:1)
(node:25668) 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 flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:25668) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠼ Generating browser application bundles (phase: setup)...(node:25746) UnhandledPromiseRejectionWarning: Error: write EPIPE
at process.target._send (internal/child_process.js:807:20)
at process.target.send (internal/child_process.js:678:19)
at file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:13756:13
at new Promise (<anonymous>)
at sendMessageToMaster (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:13752:10)
at Worker.<anonymous> (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:13817:17)
at Worker.emit (events.js:314:20)
at process.<anonymous> (internal/cluster/worker.js:32:12)
at process.emit (events.js:314:20)
at emit (internal/child_process.js:877:12)
(node:25746) 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 flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:25746) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠏ Generating browser application bundles (phase: setup)...(node:25741) UnhandledPromiseRejectionWarning: Error: write EPIPE
at process.target._send (internal/child_process.js:807:20)
at process.target.send (internal/child_process.js:678:19)
at file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:13756:13
at new Promise (<anonymous>)
at sendMessageToMaster (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:13752:10)
at Worker.<anonymous> (file:///Users/k28483/Documents/WORK/MAP/periscope/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:13817:17)
at Worker.emit (events.js:314:20)
at process.<anonymous> (internal/cluster/worker.js:32:12)
at process.emit (events.js:314:20)
at emit (internal/child_process.js:877:12)
(node:25741) 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 flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)我尝试将enableIvy : false添加到ts.config.json中,如下所示,删除了模块化的节点并重新安装它们。我仍然得到相同的错误,我如何解决这个问题?
"angularCompilerOptions": {
"enableIvy": false
}发布于 2022-08-09 07:48:23
我花了两天时间终于解决了这个问题。以下是我遵循的步骤。
1. Delete your package-lock.json
2. npm install --force
3. npm update --force发布于 2021-11-27 02:09:09
我有个错误:
未知参数:使用程序依赖项,useProgramDependencies发生未处理异常: NGCC失败.有关详细信息,请参阅“C:.角-错误.日志”。
我只是更新了角度Cli,材料和核心,以及我的项目所需的其他模块,然后更新了npm和类型记录包,仅此而已。
ng update @angular/cli @angular/core
npm update @angular/material @angular/cdk
npm install -g typescript@latest发布于 2022-04-01 08:54:13
将角更新到最新版本将解决这个问题,因为我以前的角版本为13.2.1,更新后为13.3.1
https://stackoverflow.com/questions/70130174
复制相似问题