[FR] demonstrate Next.js example with output: "standalone"
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, next.js
- Ambito
- build-system, web-dev
Direzione di ricerca
Inizia con next.js/BUILD.bazel e next.config.js, quindi esegui bazel build //next.js:next per riprodurre il fallimento di TreeArtifact che coinvolge standalone/node_modules/is-even. L’esempio è completato quando la configurazione standalone di Next.js viene compilata correttamente con Bazel e i relativi artefatti generati sono utilizzabili per l’esplorazione della distribuzione richiesta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Thanks for putting together the Bazel Next.js example. Next.js support with Bazel is something I have been hoping for for a while.
I haven't found an easy way to deploy the generated artifacts on Vercel though, so I have been exploring open-next as an open-source alternative. Open-next requires building the next.js app though in "standalone" mode as far as I understand and that I have not been able to get to work with Bazel.
I updated the next.config.js to
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
reactStrictMode: true,
swcMinify: true,
// https://nextjs.org/docs/messages/export-image-api
images: {
unoptimized: true,
},
};
module.exports = nextConfig;
However when running bazel build //next.js:next the build fails with
Starting local Bazel server and connecting to it...
INFO: Analyzed target //next.js:next (194 packages loaded, 4178 targets configured).
ERROR: /home/chris/repos/examples/frontend/next.js/BUILD.bazel:21:5: Error while validating output TreeArtifact File:[[<execution_root>]bazel-out/k8-fastbuild/bin]next.js/.next : Failed to resolve relative path standalone/node_modules/is-even inside TreeArtifact /home/chris/.cache/bazel/_bazel_chris/6124436b433d4245c5b38797a7e77c15/execroot/_main/bazel-out/k8-fastbuild/bin/next.js/.next. The associated file is either missing or is an invalid symlink.
ERROR: /home/chris/repos/examples/frontend/next.js/BUILD.bazel:21:5: JsRunBinary next.js/.next failed: not all outputs were created or valid
Target //next.js:next failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 10.898s, Critical Path: 6.68s
INFO: 29 processes: 4 internal, 1 linux-sandbox, 24 local.
ERROR: Build did NOT complete successfully
Can someone point me in the right direction here?
Has anyone found an alternative way to deploy the bazel generated artifacts to either Vecel, AWS or GCP?
Thanks,
Cheers
- Lingua principale
- Starlark
- Stelle
- 958
- Fork
- 582
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bazelbuild/examples
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
bazelbuild/examples#722 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
bazelbuild/examples#721 ·
-
[Bazel CI] ERROR: rules_rust_prost: implicit attribute defaults to @bazel_tools//tools/cpp:empty, fails single-file check (08-grpc-client-server)Forse già presa @deepalak56 l’ha presa 45 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
bazelbuild/examples#710 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
bazelbuild/examples#650 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
bazelbuild/examples#642 ·
Tutte le issue di bazelbuild/examples
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bazelbuild/apple_support#707 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
blocky: new version 0.38.0Apertaout-of-date
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
CachyOS/CachyOS-PKGBUILDS#2232 ·
I maintainer di solito rispondono entro 1 giorno
-
blast/large refactor risk/low spend-dem
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
chriskelly/MusicWall#87 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
neilotoole/sq#1503 ·
I maintainer di solito rispondono entro 1 giorno