cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.87k stars 3.77k forks source link

build: `dev build` fails with `Error: Cannot find module 'micromatch'` #94831

Closed knz closed 1 year ago

knz commented 1 year ago

This is a regression from last week.

kena@kenax ....com/cockroachdb/cockroach % dev build                                                                                                  [30/9284]
TMPDIR set to /tmp/tmp.B9nYBzFz
$ bazel build //pkg/cmd/cockroach:cockroach --config=with_ui
INFO: Invocation ID: 613e4a49-26f7-4bf1-bc86-a5cca8037e90
INFO: Analyzed target //pkg/cmd/cockroach:cockroach (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /data/home/kena/src/go/src/github.com/cockroachdb/cockroach/pkg/ui/workspaces/cluster-ui/BUILD.bazel:174:8: NpmPackageBin pkg/ui/workspaces/cluster-ui/d
ist/js/main.js failed: (Exit 1): webpack-cli.sh failed: error executing command bazel-out/freebsd-opt-exec-2B5CBBC6/bin/external/npm_cluster_ui/webpack-cli/bin
/webpack-cli.sh pkg/ui/workspaces/cluster-ui/src/index.ts --config pkg/ui/workspaces/cluster-ui/webpack.config.js ... (remaining 7 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Error: Cannot find module 'micromatch'
Require stack:
- /data/kena-cache/kena-cache/bazel/_bazel_kena/9b9f53b7334495d6a871cbb472c466bb/sandbox/processwrapper-sandbox/601/execroot/com_github_cockroachdb_cockroach/b
azel-out/freebsd-opt-exec-2B5CBBC6/bin/external/npm_cluster_ui/webpack-cli/bin/webpack-cli.sh.runfiles/npm_cluster_ui/node_modules/webpack/lib/optimize/SideEff
ectsFlagPlugin.js
- /data/kena-cache/kena-cache/bazel/_bazel_kena/9b9f53b7334495d6a871cbb472c466bb/sandbox/processwrapper-sandbox/601/execroot/com_github_cockroachdb_cockroach/b
azel-out/freebsd-opt-exec-2B5CBBC6/bin/external/npm_cluster_ui/webpack-cli/bin/webpack-cli.sh.runfiles/npm_cluster_ui/node_modules/webpack/lib/WebpackOptionsAp
ply.js
- /data/kena-cache/kena-cache/bazel/_bazel_kena/9b9f53b7334495d6a871cbb472c466bb/sandbox/processwrapper-sandbox/601/execroot/com_github_cockroachdb_cockroach/b
azel-out/freebsd-opt-exec-2B5CBBC6/bin/external/npm_cluster_ui/webpack-cli/bin/webpack-cli.sh.runfiles/npm_cluster_ui/node_modules/webpack/lib/webpack.js
- /data/kena-cache/kena-cache/bazel/_bazel_kena/9b9f53b7334495d6a871cbb472c466bb/sandbox/processwrapper-sandbox/601/execroot/com_github_cockroachdb_cockroach/b
azel-out/freebsd-opt-exec-2B5CBBC6/bin/external/npm_cluster_ui/webpack-cli/bin/webpack-cli.sh.runfiles/npm_cluster_ui/node_modules/webpack-cli/bin/utils/valida
te-options.js
- /data/kena-cache/kena-cache/bazel/_bazel_kena/9b9f53b7334495d6a871cbb472c466bb/sandbox/processwrapper-sandbox/601/execroot/com_github_cockroachdb_cockroach/b
azel-out/freebsd-opt-exec-2B5CBBC6/bin/external/npm_cluster_ui/webpack-cli/bin/webpack-cli.sh.runfiles/npm_cluster_ui/node_modules/webpack-cli/bin/utils/conver
t-argv.js
- /data/kena-cache/kena-cache/bazel/_bazel_kena/9b9f53b7334495d6a871cbb472c466bb/sandbox/processwrapper-sandbox/601/execroot/com_github_cockroachdb_cockroach/b
azel-out/freebsd-opt-exec-2B5CBBC6/bin/external/npm_cluster_ui/webpack-cli/bin/webpack-cli.sh.runfiles/npm_cluster_ui/node_modules/webpack-cli/bin/cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (node_modules/webpack/lib/optimize/SideEffectsFlagPlugin.js:7:12)
    at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at WebpackOptionsApply.process (node_modules/webpack/lib/WebpackOptionsApply.js:345:34)
    at webpack (node_modules/webpack/lib/webpack.js:57:48)
    at processOptions (node_modules/webpack-cli/bin/cli.js:272:16)
    at node_modules/webpack-cli/bin/cli.js:364:3
    at Object.parse (node_modules/webpack-cli/node_modules/yargs/yargs.js:576:18)
    at node_modules/webpack-cli/bin/cli.js:49:8
    at Object.<anonymous> (node_modules/webpack-cli/bin/cli.js:366:3)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47
Target //pkg/cmd/cockroach:cockroach failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 14.143s, Critical Path: 4.83s
INFO: 3 processes: 3 internal.
INFO: Build Event Protocol files produced successfully.
FAILED: Build did NOT complete successfully
ERROR: exit status 1

cc @rickystewart @sjbarag for triage.

Jira issue: CRDB-23168

knz commented 1 year ago

I think this is fallout from #94152.

knz commented 1 year ago

False alert - @sjbarag helped me discover I simply needed to expunge my bazel cache.