Skip to content

dev-infra: can't build project or run dev-app on MacBooks with m1 CPUs #23983

Closed
@Splaktar

Description

@Splaktar

What are you trying to do?

I've switched to an m1Max MacBook Pro as my main device now.

I've got Bazel 4.2.1 installed locally, but the build seems to be trying to install Bazel 4.0.0 and failing.

Screen Shot 2021-11-18 at 13 57 43

  1. Build the project
  2. Run the dev-app

What troubleshooting steps have you tried?

Setting my BAZEL environment variable as discussed in angular/angular#40498 (comment). This fixed Bazel builds for Framework, but not Components.

Reproduction

Steps to reproduce:

  1. yarn
  2. yarn build
splaktar-m1max:components splaktar$ yarn build
yarn run v1.22.17
$ ts-node --project scripts/tsconfig.json ./scripts/build-packages-dist.ts
######################################
  Building release packages...
######################################
2021/11/18 13:54:15 Downloading https://releases.bazel.build/4.0.0/release/bazel-4.0.0-darwin-arm64...
2021/11/18 13:54:15 could not download Bazel: HTTP GET https://releases.bazel.build/4.0.0/release/bazel-4.0.0-darwin-arm64 failed with error 404
Error: Command failed: bazel query --output=label "attr('tags', '\[.*release-package.*\]', //src/...) intersect kind('.*_package', //src/...)"
    at checkExecSyncError (node:child_process:826:11)
    at execSync (node:child_process:900:15)
    at exec (/Users/splaktar/Git/angular/components/scripts/build-packages-dist.ts:137:26)
    at buildReleasePackages (/Users/splaktar/Git/angular/components/scripts/build-packages-dist.ts:69:19)
    at performDefaultSnapshotBuild (/Users/splaktar/Git/angular/components/scripts/build-packages-dist.ts:56:10)
    at Object.<anonymous> (/Users/splaktar/Git/angular/components/scripts/build-packages-dist.ts:43:3)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Module.m._compile (/Users/splaktar/Git/angular/components/node_modules/ts-node/src/index.ts:1310:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/splaktar/Git/angular/components/node_modules/ts-node/src/index.ts:1313:12) {
  status: 1,
  signal: null,
  output: [ null, Buffer(0) [Uint8Array] [], null ],
  pid: 63907,
  stdout: Buffer(0) [Uint8Array] [],
  stderr: null
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  1. yarn dev-app
splaktar-m1max:components splaktar$ yarn dev-app
yarn run v1.22.17
$ ibazel run //src/dev-app:devserver
FATAL: Your platform/architecture combination darwin - arm64 is not yet supported.
    Follow install instructions at https://github.com/bazelbuild/bazel-watcher/blob/master/README.md to compile for your system.
node:internal/validators:119
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received an instance of Promise
    at new NodeError (node:internal/errors:371:5)
    at validateString (node:internal/validators:119:11)
    at normalizeSpawnArguments (node:child_process:503:3)
    at spawn (node:child_process:691:13)
    at main (/Users/splaktar/Git/angular/components/node_modules/@bazel/ibazel/index.js:82:18)
    at Object.<anonymous> (/Users/splaktar/Git/angular/components/node_modules/@bazel/ibazel/index.js:96:3)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_INVALID_ARG_TYPE'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  1. yarn test material/button
splaktar-m1max:components splaktar$ yarn test material/button
yarn run v1.22.17
$ node ./scripts/run-component-tests.js material/button
FATAL: Your platform/architecture combination darwin - arm64 is not yet supported.
    Follow install instructions at https://github.com/bazelbuild/bazel-watcher/blob/master/README.md to compile for your system.
node:internal/validators:119
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received an instance of Promise
    at new NodeError (node:internal/errors:371:5)
    at validateString (node:internal/validators:119:11)
    at normalizeSpawnArguments (node:child_process:503:3)
    at spawn (node:child_process:691:13)
    at main (/Users/splaktar/Git/angular/components/node_modules/@bazel/ibazel/index.js:82:18)
    at Object.<anonymous> (/Users/splaktar/Git/angular/components/node_modules/@bazel/ibazel/index.js:96:3)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_INVALID_ARG_TYPE'
}
/Users/splaktar/Git/angular/components/node_modules/shelljs/src/common.js:401
      if (config.fatal) throw e;
                        ^

Error: exec: FATAL: Your platform/architecture combination darwin - arm64 is not yet supported.
    Follow install instructions at https://github.com/bazelbuild/bazel-watcher/blob/master/README.md to compile for your system.
node:internal/validators:119
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received an instance of Promise
    at new NodeError (node:internal/errors:371:5)
    at validateString (node:internal/validators:119:11)
    at normalizeSpawnArguments (node:child_process:503:3)
    at spawn (node:child_process:691:13)
    at main (/Users/splaktar/Git/angular/components/node_modules/@bazel/ibazel/index.js:82:18)
    at Object.<anonymous> (/Users/splaktar/Git/angular/components/node_modules/@bazel/ibazel/index.js:96:3)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_INVALID_ARG_TYPE'
}

    at Object.error (/Users/splaktar/Git/angular/components/node_modules/shelljs/src/common.js:110:27)
    at execSync (/Users/splaktar/Git/angular/components/node_modules/shelljs/src/exec.js:102:12)
    at Object._exec (/Users/splaktar/Git/angular/components/node_modules/shelljs/src/exec.js:205:12)
    at Object.exec (/Users/splaktar/Git/angular/components/node_modules/shelljs/src/common.js:335:23)
    at Object.<anonymous> (/Users/splaktar/Git/angular/components/scripts/run-component-tests.js:102:9)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment

  • Angular: 13.0.1
  • CDK/Material: master
  • Browser(s): Chrome 95.0.4638.69 (Official Build) (arm64)
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS Monterey 12.0.1 (21A559)
  • Bazel: 4.2.1- (@Non-Git) /opt/local/bin/bazel

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: dev-infraIssue related to internal project infrastructuretroubleshootingThis issue is not reporting an issue, but just asking for help

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions