[FR] demonstrate Next.js example with output: "standalone"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, next.js
- Lĩnh vực
- build-system, web-dev
Hướng nghiên cứu
Bắt đầu với next.js/BUILD.bazel và next.config.js, sau đó chạy bazel build //next.js:next để tái hiện lỗi TreeArtifact liên quan đến standalone/node_modules/is-even. Ví dụ được hoàn tất khi cấu hình standalone của Next.js được build thành công bằng Bazel và các artifact được tạo ra có thể sử dụng cho việc nghiên cứu triển khai được yêu cầu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Starlark
- Star
- 958
- Fork
- 582
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bazelbuild/examples
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
bazelbuild/examples#722 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 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)Có thể đã có người làm @deepalak56 đã nhận 45 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
bazelbuild/examples#710 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
bazelbuild/examples#650 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
bazelbuild/examples#642 ·
Tất cả issue của bazelbuild/examples
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
bazelbuild/apple_support#707 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
blocky: new version 0.38.0Đang mởout-of-date
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CachyOS/CachyOS-PKGBUILDS#2232 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
blast/large refactor risk/low spend-dem
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
chriskelly/MusicWall#87 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
neilotoole/sq#1503 ·
Maintainer thường phản hồi trong vòng 1 ngày