question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Attempting to build angular source code fails with error - "Failed to determine workspace status"

See original GitHub issue

Which @angular/* package(s) are the source of the bug?

common

Is this a regression?

Yes

Description

yarn build fails with error “ERROR: <builtin>: BazelWorkspaceStatusAction stable-status.txt failed: Failed to determine workspace status”

git clone https://github.com/angular/angular.git cd angular npm install -g yarn yarn install yarn build

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

PS C:\code\github\angular> yarn build
yarn run v1.22.17
$ ts-node --esm --project scripts/tsconfig.json scripts/build/build-packages-dist.mts
######################################
  Building release packages...
######################################
Starting local Bazel server and connecting to it...
Loading: 282 packages loaded
//packages/animations:npm_package
//packages/bazel:npm_package
//packages/common:npm_package
//packages/compiler:npm_package
//packages/compiler-cli:npm_package
//packages/core:npm_package
//packages/elements:npm_package
//packages/forms:npm_package
//packages/language-service:npm_package
//packages/localize:npm_package
//packages/platform-browser:npm_package
//packages/platform-browser-dynamic:npm_package
//packages/platform-server:npm_package
//packages/router:npm_package
//packages/service-worker:npm_package
//packages/upgrade:npm_package
C:/users/nihar/_bazel_nihar/bp66z4es/execroot/angular/bazel-out/x64_windows-fastbuild/bin
INFO: Analyzed 16 targets (357 packages loaded, 44914 targets configured).
INFO: Found 16 targets...
ERROR: <builtin>: BazelWorkspaceStatusAction stable-status.txt failed: Failed to determine workspace status: Process exited with status 1
C:\code\github\angular\node_modules\ts-node\src\index.ts:843
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: Γ¿» Unable to compile TypeScript:
error TS5083: Cannot read file 'C:\.ng-dev\tsconfig.json'.

    at createTSError (C:\code\github\angular\node_modules\ts-node\src\index.ts:843:12)
    at reportTSError (C:\code\github\angular\node_modules\ts-node\src\index.ts:847:19)
    at createFromPreloadedConfig (C:\code\github\angular\node_modules\ts-node\src\index.ts:858:36)
    at create (C:\code\github\angular\node_modules\ts-node\src\index.ts:613:10)
    at register (C:\code\github\angular\node_modules\ts-node\src\index.ts:580:15)
    at Object.registerAndCreateEsmHooks (C:\code\github\angular\node_modules\ts-node\src\esm.ts:116:34)
    at file:///C:/code/github/angular/node_modules/ts-node/esm.mjs:8:7
    at ModuleJob.run (internal/modules/esm/module_job.js:170:25)
    at async Loader.import (internal/modules/esm/loader.js:178:24)
    at async internal/process/esm_loader.js:57:9 {
  diagnosticCodes: [ 5083 ]
}
INFO: Elapsed time: 21.300s, Critical Path: 2.76s
INFO: 4 processes: 4 internal.
FAILED: Build did NOT complete successfully
Error: Command failed: yarn -s bazel build --config=snapshot-build //packages/animations:npm_package //packages/bazel:npm_package //packages/common:npm_package //packages/compiler:npm_package //packages/compiler-cli:npm_package //packages/core:npm_package //packages/elements:npm_package //packages/forms:npm_package //packages/language-service:npm_package //packages/localize:npm_package //packages/platform-browser:npm_package //packages/platform-browser-dynamic:npm_package //packages/platform-server:npm_package //packages/router:npm_package //packages/service-worker:npm_package //packages/upgrade:npm_package
    at checkExecSyncError (child_process.js:760:11)
    at execSync (child_process.js:833:15)
    at exec (file:///C:/code/github/angular/scripts/build/package-builder.mts:126:18)
    at buildReleasePackages (file:///C:/code/github/angular/scripts/build/package-builder.mts:80:3)
    at performDefaultSnapshotBuild (file:///C:/code/github/angular/scripts/build/package-builder.mts:45:10)
    at file:///C:/code/github/angular/scripts/build/build-packages-dist.mts:17:1
    at ModuleJob.run (internal/modules/esm/module_job.js:170:25)
    at async Loader.import (internal/modules/esm/loader.js:178:24)
    at async Object.loadESM (internal/process/esm_loader.js:68:5) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 16320,
  stdout: null,
  stderr: null
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS C:\code\github\angular>

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 14.1.0-next.4
Node: 14.17.6
Package Manager: yarn 1.22.17
OS: win32 x64

Angular: undefined
...

Package                                Version
----------------------------------------------------------------
@angular-devkit/architect              0.1401.0-next.4
@angular-devkit/build-angular          14.1.0-next.4
@angular-devkit/build-optimizer        0.1302.0-rc.1
@angular-devkit/core                   14.1.0-next.4
@angular-devkit/schematics             14.1.0-next.4
@angular/animations-12                 12.2.13
@angular/cdk                           14.1.0-next.3
@angular/cli                           14.1.0-next.4
@angular/common-12                     12.2.13
@angular/core-12                       12.2.13
@angular/dev-infra-private             0.0.0-9bbee479ef6084948452c9fbf3b67eaac0d0d9d8
@angular/forms-12                      12.2.13
@angular/material                      14.1.0-next.3
@angular/platform-browser-12           12.2.13
@angular/platform-browser-dynamic-12   12.2.13
@angular/platform-server-12            12.2.13
@angular/router-12                     12.2.13
@bazel/bazelisk                        1.11.0
@bazel/buildifier                      5.1.0
@bazel/concatjs                        5.5.2
@bazel/esbuild                         5.5.2
@bazel/ibazel                          v0.16.2
@bazel/jasmine                         5.5.2
@bazel/protractor                      5.5.2
@bazel/rollup                          5.5.2
@bazel/runfiles                        5.5.2
@bazel/terser                          5.5.2
@bazel/worker                          5.5.2
@schematics/angular                    14.1.0-next.4
rxjs                                   6.6.7
typescript                             4.7.2

Anything else?

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
jessicajaniukcommented, Jul 12, 2022

@phalgunv I’ve spoken with our Powershell / Windows expert. Windows contributors are expected to use Git bash or equivalent due to indirect Bazel requirements. Powershell used to work unofficially, but there’s a bug currently in ts-node that is in progress of being fixed. At that point you should be able to use Powershell again, but we strongly emphasize and recommend usage of git bash or equivalent for contributing on Windows. We can’t guarantee Powershell functionality with yarn build.

0reactions
angular-automatic-lock-bot[bot]commented, Aug 12, 2022

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular production build error in nx version 13.7.1 · Issue #8768
Steps to Reproduce. Create nx workspace with v13.7.1; Run npx nx build. Failure Logs. PS D:\VS Code ...
Read more >
angular 13 ng build library fails (ivy partial compilation mode)
I try ng build my-lib and get the below error. ✖ Compiling with Angular sources in Ivy partial compilation mode. Transform failed with ......
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >
Visual Studio Code Workspace Trust security
Workspace Trust. Visual Studio Code takes security seriously and wants to help you safely browse and edit code no matter the source or...
Read more >
ng test - Angular
Option Description Value Type Defau... ‑‑browsers Override which browsers tests are run against. string ‑‑code‑coverage Output a code coverage report. boolean false ‑‑code‑coverage‑exclude Globs to exclude...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found