gpt4 book ai didi

angular - 类型错误 : Cannot read property 'kind' of undefined at getAssignmentTargetKind

转载 作者:太空狗 更新时间:2023-10-29 16:55:09 25 4
gpt4 key购买 nike

将我的 Angular 6 项目更新到 7.x 时开始出现此问题。

我在 angular-cli github repo 上提出了一个问题,但他们无能为力。

所以我所做的是创建一个新项目并一个一个地添加所有组件,以“希望”注意到导致问题的原因。

很遗憾,我无法确定问题所在。这是日志:

ERROR in : TypeError: Cannot read property 'kind' of undefined
at getAssignmentTargetKind (E:\McClient\node_modules\typescript\lib\typescript.js:10049:28)
at Object.isAssignmentTarget (E:\McClient\node_modules\typescript\lib\typescript.js:10092:16)
at checkObjectLiteral (E:\McClient\node_modules\typescript\lib\typescript.js:46107:45)
at checkExpressionWorker (E:\McClient\node_modules\typescript\lib\typescript.js:50748:28)
at checkExpression (E:\McClient\node_modules\typescript\lib\typescript.js:50696:42)
at checkExpressionWithContextualType (E:\McClient\node_modules\typescript\lib\typescript.js:50524:26)
at checkApplicableSignature (E:\McClient\node_modules\typescript\lib\typescript.js:47963:35)
at chooseOverload (E:\McClient\node_modules\typescript\lib\typescript.js:48281:26)
at resolveCall (E:\McClient\node_modules\typescript\lib\typescript.js:48231:26)
at resolveCallExpression (E:\McClient\node_modules\typescript\lib\typescript.js:48534:20)
at resolveSignature (E:\McClient\node_modules\typescript\lib\typescript.js:48800:28)
at getResolvedSignature (E:\McClient\node_modules\typescript\lib\typescript.js:48844:26)
at checkCallExpression (E:\McClient\node_modules\typescript\lib\typescript.js:48936:29)
at checkExpressionWorker (E:\McClient\node_modules\typescript\lib\typescript.js:50759:28)
at checkExpression (E:\McClient\node_modules\typescript\lib\typescript.js:50696:42)
at resolveDecorator (E:\McClient\node_modules\typescript\lib\typescript.js:48741:28)

这是 github 问题的链接,其中包含我应该记录的 checkSourcefile 函数的日志:

https://github.com/angular/angular-cli/issues/13172

我如何追踪并(希望)解决导致此问题的原因?

编辑:我的 ng --version 信息

Angular CLI: 7.1.3
Node: 8.11.4
OS: win32 x64
Angular: 7.1.3
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.11.3
@angular-devkit/build-angular 0.11.3
@angular-devkit/build-optimizer 0.11.3
@angular-devkit/build-webpack 0.11.3
@angular-devkit/core 7.1.3
@angular-devkit/schematics 7.1.3
@angular/cdk 7.1.1
@ngtools/webpack 7.1.3
@schematics/angular 7.1.3
@schematics/update 0.11.3
rxjs 6.3.3
typescript 3.1.6
webpack 4.23.1

最佳答案

我只是重新运行

    ng serve

又一次成功了!

关于angular - 类型错误 : Cannot read property 'kind' of undefined at getAssignmentTargetKind,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53827570/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com