aspect-build / aspect-build/rules_js

[Bug]: Vue example not working on Windows

Open
#2,260 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Starlark
Stars
378
Forks
183
Avg merge
1d 9h
Merged PRs (30d)
32

Description

### What happened?

♠I was trying to run the [Vue example](https://github.com/bazelbuild/examples/tree/main/frontend/vue) on a Windows PC. The only change I made was upgrading to 8.1.1.

When running `bazel build //vue:build` from the parent directory, I get this error:

```shell
bazel build //vue:build

INFO: Analyzed target //vue:build (268 packages loaded, 4573 targets configured).
ERROR: C:/users/User/examples/frontend/BUILD.bazel:10:22: Running lifecycle hooks on npm package fsevents@2.3.3 [for tool] failed: (Exit 127): lifecycle-hooks.bat failed: error executing NpmLifecycxec-ST-d57f47055a04\bin\external\aspect_rules_js+\npm\private\lifecycle\lifecycle-hooks_\lifecycle-hooks.bat fsevents ... (remaining 4 arguments skipped)
/bin/bash: line 1: C:/users/User/_bazel_User/wusnrtta/execroot/_main/bazel-out/x64_windows-opt-exec-ST-d57f47055a04/bin/external/aspect_rules_js+/npm/private/lifecycle/lifecycle-hooks_/lifecycle-hooks: No such file or directory
ERROR: C:/users/User/examples/frontend/BUILD.bazel:10:22: Running lifecycle hooks on npm package esbuild-windows-arm64@0.15.18 [for tool] failed: (Exit 127): lifecycle-hooks.bat failed: error executing NpmLifecycleHook command (from target //:.aspect_rules_js/node_modules/esbuild-windows-arm64@0.15.18/lc) bazel-out\x64_windows-opt-exec-ST-d57f47055a04\bin\external\aspect_rules_js+\npm\private\lifecycle\lifecycle-hooks_\lifecycle-hooks.bat esbuild-windows-arm64 ... (remaining 4 arguments skipped)
/bin/bash: line 1: C:/users/User/_bazel_User/wusnrtta/execroot/_main/bazel-out/x64_windows-opt-exec-ST-d57f47055a04/bin/external/aspect_rules_js+/npm/private/lifecycle/lifecycle-hooks_/lifecycle-hooks: No such file or directory
Target //vue:build failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 90.098s, Critical Path: 17.94s
INFO: 667 processes: 441 internal, 226 local.
ERROR: Build did NOT complete successfully
```

### Version

Development (host) and target OS/architectures:

Windows 10

Output of `bazel --version`:

bazel 8.1.1

Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file:

```bzl
bazel_dep(name = "aspect_bazel_lib", version = "2.8.1")
bazel_dep(name = "aspect_rules_lint", version = "1.2.2")
bazel_dep(name = "aspect_rules_jest", version = "0.22.0")
bazel_dep(name = "aspect_rules_js", version = "2.0.2")
bazel_dep(name = "aspect_rules_swc", version = "2.0.1")
bazel_dep(name = "aspect_rules_ts", version = "3.1.0")
bazel_dep(name = "aspect_rules_rollup", version = "2.0.1")
bazel_dep(name = "aspect_rules_webpack", version = "0.16.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_nodejs", version = "6.2.0")

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "20.13.1")
```

Language(s) and/or frameworks involved:

- Javascript
- Vue

### How to reproduce

```shell
Run the example
```

### Any other information?

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure from the frontend/vue example with `bazel build //vue:build` on Windows 10, then inspect `frontend/BUILD.bazel` at the reported line and the supplied `MODULE.bazel` dependency versions. Done means the Vue example builds successfully on Windows without the lifecycle-hooks path error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.