Unable to build on Windows 10
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/....scripts/build
, bazel
Is this a regression?
Yes, the previous version in which this bug was not present was: ....Description
A clear and concise description of the problem...While issuing node ./scripts/build/build-packages-dist.js
, the build getting failed.
π¬ Minimal Reproduction
https://stackblitz.com/...π₯ Exception or Error
PS D:\OpenSource\angular> node ./scripts/build/build-packages-dist.js >> buil_error.txt
INFO: Repository npm instantiated at:
D:/opensource/angular/WORKSPACE:30:13: in <toplevel>
C:/users/anusername/_bazel_anusername/idexbm2i/external/build_bazel_rules_nodejs/index.bzl:78:18: in yarn_install
Repository rule yarn_install defined at:
C:/users/anusername/_bazel_anusername/idexbm2i/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:652:31: in <toplevel>
DEBUG: C:/users/anusername/_bazel_anusername/idexbm2i/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:342:14: _
DEBUG: C:/users/anusername/_bazel_anusername/idexbm2i/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:343:14: <unknown object com.google.devtools.build.lib.bazel.repository.starlark.StarlarkExecutionResult>
ERROR: An error occurred during the fetch of repository 'npm':
Traceback (most recent call last):
File "C:/users/anusername/_bazel_anusername/idexbm2i/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 618, column 15, in _yarn_install_impl
_copy_file(repository_ctx, repository_ctx.attr.package_json)
File "C:/users/anusername/_bazel_anusername/idexbm2i/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 345, column 17, in _copy_file
fail("mkdir -p %s failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (dirname, result.stdout, result.stderr))
Error in fail: mkdir -p _ failed:
STDOUT:
STDERR:
java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("mkdir" -p _): The system cannot find the file specified.
(error: 2)
ERROR: Error fetching repository: Traceback (most recent call last):
File "C:/users/anusername/_bazel_anusername/idexbm2i/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 618, column 15, in _yarn_install_impl
_copy_file(repository_ctx, repository_ctx.attr.package_json)
File "C:/users/anusername/_bazel_anusername/idexbm2i/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 345, column 17, in _copy_file
fail("mkdir -p %s failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (dirname, result.stdout, result.stderr))
Error in fail: mkdir -p _ failed:
STDOUT:
STDERR:
java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("mkdir" -p _): The system cannot find the file specified.
(error: 2)
ERROR: no such package '@npm//@bazel/protractor': mkdir -p _ failed:
STDOUT:
STDERR:
java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("mkdir" -p _): The system cannot find the file specified.
(error: 2)
child_process.js:655
throw err;
^
Error: Command failed: yarn --cwd "D:\OpenSource\angular" --silent bazel info bazel-bin
at checkExecSyncError (child_process.js:616:11)
at execSync (child_process.js:652:15)
at exec (D:\OpenSource\angular\scripts\build\package-builder.js:132:18)
at Object.<anonymous> (D:\OpenSource\angular\scripts\build\package-builder.js:40:18)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18) {
status: 1,
signal: null,
output: [ null, Buffer(0) [Uint8Array] [], null ],
pid: 15276,
stdout: Buffer(0) [Uint8Array] [],
stderr: null
}
π Your Environment
Angular Version:
Anything else relevant?
Windows 10 Pro. Build: 19042.867
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
Unable to load windows 10 on a Brand new build
Hi, The error code means the file or directory is corrupted and unreadable. It might be source or the destination. Please try using...
Read more >How to fix 0x8020000f error - build install fails on Windows 10
Oh no! Windows 10 build install fails with error 0x8020000f?Don't worry too much, just watch this video to see how you can fix...
Read more >Unable to build Windows App SDK self contained applications ...
When trying to build a self contained unpackaged app the build fails with the following error when the user folder contains a space:...
Read more >Unable to Build wxWidgets on Windows 10
OS: Windows 10. IDE: Visual Studio 2022. Steps I'm using: 1. unzipping wxWidgets-3.2.1 into an exclusive folder for use with VS2022
Read more >Can't Install Windows 10 with Code 0x80300024 - EaseUS
[7 Ways] Can't Install Windows 10 on a New Build with Code 0x80300024, Get Help Here! Β· 1. Check the System Requirements Β·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK, so I pulled the latest master, did a full
git clean -xfd
, ensure I was on the correctyarn
andnode
versions. Then ranyarn
and finallynode scripts\build\build-packages-dist.js
, and the script completed successfully.Although I had the
C:\msys64\usr\bin
in my user PATH, it wasnβt appearing when I ranPATH
from the command line, so I added it to the system PATH. So my PATH now contains:Can you try adding
C:\msys64\usr\bin
to your PATH? I was getting the same problem as this. It turned out that despite having setupBAZEL_SH
to correctly point to the msys2 bash program, the PATH was not allowing the scripts being run in that shell to access the relevant tools, such asmkdir
.