我正在尝试将 Angular 项目集成到现有的 Bazel 构建系统中。当我尝试运行 angular build 时,出现以下错误。
Workspace configuration file (angular.json, .angular.json, workspace.json, .workspace.json) cannot be found in '/home/build/.cache/bazel/_bazel_build/46b74a3c1f9a666f55591a5719d9f2ba/sandbox/linux-sandbox/1/execroot/root' or in parent directories.
现在我的角度项目位于根工作区的子文件夹中,因此角度无法找到角度 json 文件。当我使用 angular devkit 的架构师包运行 angular build 时,也没有选项可以使用 args 指定 angular json 的确切位置,这可能会解决问题。
一种方法,我能想到的解决方法是在运行构建命令之前将 angular json 文件复制到工作区的根目录。我还有其他选择吗?