javascript - Angular 7 ng build,registry.registerUriHandler 不是 bitbucket 管道中的函数

标签 javascript angular pipeline bitbucket-pipelines angular7

我刚刚将我的应用程序更新到 Angular 7,它在本地编译得很好,但是当我尝试部署到 bitbucket 时,我在 ng build 中遇到了这个错误

registry.registerUriHandler is not a function TypeError: registry.registerUriHandler is not a function at Object.runCommand (/opt/atlassian/pipelines/agent/build/node_modules/@angular/cli/models/command-runner.js:47:14) at default_1 (/opt/atlassian/pipelines/agent/build/node_modules/@angular/cli/lib/cli/index.js:32:54) at Object. (/usr/local/lib/node_modules/@angular/cli/lib/init.js:125:1) at Module._compile (module.js:643:30) at Object.Module._extensions..js (module.js:654:10) at Module.load (module.js:556:32) at tryModuleLoad (module.js:499:12) at Function.Module._load (module.js:491:3) at Module.require (module.js:587:17) at require (internal/module.js:11:18)

我不明白管道与此有什么关系,但我认为这可能是 Angular 错误,知道如何解决这个问题吗?

最佳答案

好吧,我在经历了很多头痛之后发现了这个问题,管道试图用 angular 6 cli 构建 angular 7 应用程序,甚至认为我正在明确安装 @angular/cli 7.0.2。我发现管道缓存了 node_modules,所以它使用旧的 cli,清理缓存使错误消失。

关于javascript - Angular 7 ng build,registry.registerUriHandler 不是 bitbucket 管道中的函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52978877/

相关文章:

angular - “在 Angular 区域外触发导航”解释

Azure devOps 构建管道 : Force fail yaml step. bash 以防出现 isql 问题

java - Apache Camel : creating simple POJO pipelines (put a POJO in and get a POJO out)

javascript - 保存客户端动态请求的数据

javascript - <label><label/> 标记内的 <A><A/> 标记在 href 上具有 javascript 函数无法运行

angular - 从 Angular2 中的原始元素获取表单控件

scala - 如何在多列上使用 spark quantilediscretizer

javascript - 从嵌套对象和数组的巨大 JSON 中以编程方式解构特定属性的最佳且最有效的方法

javascript - 如何更改 jquery mobile 中面板的高度?

css - Angular 2如何在幻灯片中淡化页面的其余部分