Visual C++ build tools seems to be installed But Bazel can't find the following tools: cl.exe, link.exe, lib.exe, ml64.exe

Viewed 513

I am trying to build Angular on windows server 2019 AWS Virtual Machine.

  1. I downloaded angular-master.zip from https://github.com/angular/angular
  2. I unzipped this angular-master.zip

I downloaded following Prerequisite softwares. 1. Prerequisite Software

• Git and/or the GitHub app (for Mac or Windows); GitHub's Guide to Installing Git is a good source of information. • Node.js, (version specified in the engines field of package.json) which is used to run a development web server, run tests, and generate distributable files. • Yarn (version specified in the engines field of package.json) which is used to install dependencies. • Java Development Kit which is used to execute the selenium standalone server for e2e testing.

  1. I have done - yarn install
  2. I have done - yarn global add windows-build-tools. It has installed C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools on my Virtual machine. It has also installed - C:\Users\Administrator.windows-build-tools\python27

  3. I have done - node ./scripts/build/build-packages-dist.js

it is giving following error –

INFO: Analyzed 18 targets (1 packages loaded, 179 targets configured). INFO: Found 18 targets... ERROR: C:/users/administrator/_bazel_administrator/e2kq7fn3/external/com_google_protobuf/BUILD:267:11: C++ compilation of rule '@com_google_protobuf//:protoc_lib' failed (Exit 1)

The target you are compiling requires Visual C++ build tools. Bazel couldn't find a valid Visual C++ build tools installation on your machine.

Visual C++ build tools seems to be installed at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC But Bazel can't find the following tools: cl.exe, link.exe, lib.exe, ml64.exe

Please check your installation following https://docs.bazel.build/versions/master/windows.html#using

INFO: Elapsed time: 2210.447s, Critical Path: 1095.73s INFO: 18 processes: 16 local, 2 worker. FAILED: Build did NOT complete successfully child_process.js:669 throw err; ^

Error: Command failed: yarn --cwd "c:\angular\angular-master" --silent bazel build --config=release --config=view-engine //packages/upgrade:npm_package //packages/service-worker:npm_package //packages/router:npm_package //packages/platform-webworker-dynamic:npm_package //packages/platform-webworker:npm_package //packages/platform-server:npm_package //packages/platform-browser-dynamic:npm_package //packages/platform-browser:npm_package //packages/localize:npm_package //packages/language-service:npm_package //packages/forms:npm_package //packages/elements:npm_package //packages/core:npm_package //packages/compiler-cli:npm_package //packages/compiler:npm_package //packages/common:npm_package //packages/bazel:npm_package //packages/animations:npm_package

at checkExecSyncError (child_process.js:630:11)
at execSync (child_process.js:666:15)
at exec (c:\angular\angular-master\scripts\build\package-builder.js:122:18)
at buildTargetPackages (c:\angular\angular-master\scripts\build\package-builder.js:81:3)
at Object.<anonymous> (c:\angular\angular-master\scripts\build\build-packages-dist.js:18:1)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {

status: 1, signal: null, output: [ null, null, null ], pid: 6708, stdout: null, stderr: null }

0 Answers
Related