aspect-build / aspect-build/rules_js
[FR]: Provide an example for nuxt
- Dominant language
- Starlark
- Stars
- 378
- Forks
- 183
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 32
Description
### What is the current behavior?
There is no example for nuxt using aspect_rules_js. There is a very old example that I can't get to build from rules_nodejs here: https://github.com/albttx/bazel-nuxt additionally the example is only about `nuxt generate` where I am trying to get an SSR example working.
### Describe the feature
I tried creating an example nuxt application like so:
https://github.com/EricWaddell/examples/tree/eric/nuxt/build-failing
Running `//nuxt:nuxt` (nuxt dev), `//nuxt:prepare` or `//nuxt:generate` all work fine with the above build, but `//nuxt:build` fails with
```
ERROR EACCES: permission denied, open '/private/var/tmp/_bazel_user/7d974ac54b5c73c72b275cd5cccbb7da/sandbox/darwin-sandbox/1716/execroot/_main/bazel-out/darwin_x86_64-fastbuild/bin/nuxt/.output/server/node_modules/@unhead/dom/package.json'
```
I think `nuxt build` is both copying node_modules to the .output directory and then accessing them resulting in a failure due to sandboxing.
Contributor guide
Research direction
Start with the linked examples branch and the Bazel targets //nuxt:nuxt, //nuxt:prepare, //nuxt:generate, and //nuxt:build. Reproduce the failing SSR build and inspect the reported .output/server/node_modules/@unhead/dom/package.json access under the Bazel sandbox. Done means a Nuxt SSR example builds successfully and is documented alongside the working targets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nuxtjs
- Domain
- build-system, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100