AWS Codepipeline失败 - 错误:调试失败。错误的表达:非弦值传递给`ts.resolvetyperecrededirative'

发布于 2025-02-03 11:39:05 字数 4402 浏览 4 评论 0原文

这一切都很好 - 突然间,我推动了,突然我的管道始终失败。 该代码在本地工作正常,因此不知道突然触发了什么。这是该执行输出,它说它失败了:

Compiling @alyle/ui/menu : es2015 as esm2015
Compiling @alyle/ui/themes/minima : es2015 as esm2015
Compiling @angular/cdk/clipboard : es2015 as esm2015
An error occurred during the build:
Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.
    at Object.resolveTypeReferenceDirective (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:42530:18)
    at /codebuild/output/src882534748/src/web/node_modules/@ngtools/webpack/src/ivy/host.js:165:35



    at Array.map (<anonymous>)



    at Object.host.resolveTypeReferenceDirectives (/codebuild/output/src882534748/src/web/node_modules/@ngtools/webpack/src/ivy/host.js:164:32)



    at actualResolveTypeReferenceDirectiveNamesWorker (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:116611:163)



    at resolveTypeReferenceDirectiveNamesWorker (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:116911:26)



    at processTypeReferenceDirectives (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118393:31)



    at findSourceFileWorker (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118278:21)



    at findSourceFile (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118133:26)



    at processImportedModules (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118539:25)



    at findSourceFileWorker (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118284:17)
    at findSourceFile (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118133:26)
    at processImportedModules (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118539:25)
    at findSourceFileWorker (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118284:17)
    at findSourceFile (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118133:26)
    at processImportedModules (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118539:25)
An unhandled exception occurred: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.

See "/tmp/ng-PiwkC7/angular-errors.log" for further details.
[Container] 2022/05/30 16:09:49 Command did not exit successfully ng build --source-map=false exit status 127



[Container] 2022/05/30 16:09:49 Phase complete: BUILD State: FAILED



[Container] 2022/05/30 16:09:49 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: ng build --source-map=false. Reason: exit status 127
[Container] 2022/05/30 16:09:49 Entering phase POST_BUILD
[Container] 2022/05/30 16:09:49 Running command mkdir ppartifact

[Container] 2022/05/30 16:09:49 Running command cp -a web/dist/. ppartifact/
cp: cannot stat 'web/dist/.': No such file or directory
[Container] 2022/05/30 16:09:49 Command did not exit successfully cp -a web/dist/. ppartifact/ exit status 1
[Container] 2022/05/30 16:09:49 Phase complete: POST_BUILD State: FAILED
[Container] 2022/05/30 16:09:49 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: cp -a web/dist/. ppartifact/. Reason: exit status 1
[Container] 2022/05/30 16:09:49 Expanding base directory path: ppartifact
[Container] 2022/05/30 16:09:49 Assembling file list
[Container] 2022/05/30 16:09:49 Expanding ppartifact
[Container] 2022/05/30 16:09:49 Skipping invalid file path ppartifact
[Container] 2022/05/30 16:09:49 Phase complete: UPLOAD_ARTIFACTS State: FAILED
[Container] 2022/05/30 16:09:49 Phase context status code: CLIENT_ERROR Message: no matching base directory path found for ppartifact

这是一个基于角度的站点 - 它工作正常 - 我还没有安装任何新的依赖性。问题是什么?

更新---

好吧,我的不好 - 代码在本地也被打破了。我收到的错误消息几乎是相同的 - 我试图降级Angular和TSC,但没有发生太多事情。这里最好的行动方案是什么?

This was working perfectly fine - all of a sudden I do a push and suddenly my pipeline is failing consistently. The code works fine locally so have no idea what triggered this all of a sudden. This is the execution output where it says it failed:

Compiling @alyle/ui/menu : es2015 as esm2015
Compiling @alyle/ui/themes/minima : es2015 as esm2015
Compiling @angular/cdk/clipboard : es2015 as esm2015
An error occurred during the build:
Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.
    at Object.resolveTypeReferenceDirective (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:42530:18)
    at /codebuild/output/src882534748/src/web/node_modules/@ngtools/webpack/src/ivy/host.js:165:35



    at Array.map (<anonymous>)



    at Object.host.resolveTypeReferenceDirectives (/codebuild/output/src882534748/src/web/node_modules/@ngtools/webpack/src/ivy/host.js:164:32)



    at actualResolveTypeReferenceDirectiveNamesWorker (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:116611:163)



    at resolveTypeReferenceDirectiveNamesWorker (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:116911:26)



    at processTypeReferenceDirectives (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118393:31)



    at findSourceFileWorker (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118278:21)



    at findSourceFile (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118133:26)



    at processImportedModules (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118539:25)



    at findSourceFileWorker (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118284:17)
    at findSourceFile (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118133:26)
    at processImportedModules (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118539:25)
    at findSourceFileWorker (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118284:17)
    at findSourceFile (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118133:26)
    at processImportedModules (/codebuild/output/src882534748/src/web/node_modules/typescript/lib/typescript.js:118539:25)
An unhandled exception occurred: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.

See "/tmp/ng-PiwkC7/angular-errors.log" for further details.
[Container] 2022/05/30 16:09:49 Command did not exit successfully ng build --source-map=false exit status 127



[Container] 2022/05/30 16:09:49 Phase complete: BUILD State: FAILED



[Container] 2022/05/30 16:09:49 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: ng build --source-map=false. Reason: exit status 127
[Container] 2022/05/30 16:09:49 Entering phase POST_BUILD
[Container] 2022/05/30 16:09:49 Running command mkdir ppartifact

[Container] 2022/05/30 16:09:49 Running command cp -a web/dist/. ppartifact/
cp: cannot stat 'web/dist/.': No such file or directory
[Container] 2022/05/30 16:09:49 Command did not exit successfully cp -a web/dist/. ppartifact/ exit status 1
[Container] 2022/05/30 16:09:49 Phase complete: POST_BUILD State: FAILED
[Container] 2022/05/30 16:09:49 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: cp -a web/dist/. ppartifact/. Reason: exit status 1
[Container] 2022/05/30 16:09:49 Expanding base directory path: ppartifact
[Container] 2022/05/30 16:09:49 Assembling file list
[Container] 2022/05/30 16:09:49 Expanding ppartifact
[Container] 2022/05/30 16:09:49 Skipping invalid file path ppartifact
[Container] 2022/05/30 16:09:49 Phase complete: UPLOAD_ARTIFACTS State: FAILED
[Container] 2022/05/30 16:09:49 Phase context status code: CLIENT_ERROR Message: no matching base directory path found for ppartifact

This is an angular based site - it was working fine - I havent installed any new dependencies. What could the issue be?

UPDATE---

OK my bad - the code is broken locally as well. The error message I'm getting is pretty much the same - I've tried to downgrade angular and tsc but nothing much has happened. Whats the best course of action here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

醉生梦死 2025-02-10 11:39:05

将TS节点升级到2.0.0在这里解决了问题。

Upgrading ts-node to 2.0.0 solved the problem here.

泪是无色的血 2025-02-10 11:39:05

弄清楚了 - 显然最终将我的打字稿降级到4.5.5

Figured it out - apparently ended up downgrading my typescript to 4.5.5

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文