DevTools silently disabled when `test: true` is set - seems not documented and possibly environment-dependent
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
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- nuxt, typescript
Hướng nghiên cứu
Tái hiện hành vi từ nuxt.config.ts bằng cách bật tắt devtools.enabled và test, sau đó đọc tài liệu testing tại nuxt.com/docs/getting-started/testing. Theo dõi cách chế độ test ảnh hưởng đến việc bật DevTools trong các môi trường được báo cáo. Hoàn tất khi hành vi dự kiến được xác nhận và được ghi lại rõ ràng hoặc được sửa, đồng thời các kiểm tra liên quan đều đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
When test: true is set in nuxt.config.ts, the Nuxt DevTools are silently disabled - even if devtools.enabled: true is explicitly configured.
This behavior seems environment-dependent. I've personally tested the following setups:
- ✅ Ubuntu native → DevTools show up even with
test: true(Ubuntu 24.04.1 LTS) - ❌ Debian native → DevTools do not show up when
test: true(Debian 12.11) - ❌ WSL2 (Ubuntu on Windows 10) → DevTools do not show up when
test: true(WSL2 Ubuntu 24.04.1 LTS on Windows 10 version 22H2)
I haven't tested on macOS or CI environments.
Also, I am not sure if this is not operating system dependent, but more node or pnpm version dependent as I had the same node, pnpm and project setup unified tested:
test setup
- node v22.14.0
- pnpm v10.9.0
- setup clean project only with:
pnpm create nuxt@latestwith pnpm, no modules and not git.
Only modification innuxt.config.ts, see below.
Test Result
- The following
nuxt.config.tsconfiguration:
Results in:devtools: { enabled: true }, test: true> pnpm dev > nuxt dev Nuxt 3.17.5 with Nitro 2.11.12 ➜ Local: http://localhost:3000/ ➜ Network: use --host to expose ✔ Vite client built in 43ms ✔ Vite server built in 308ms ✔ Nuxt Nitro server built in 702ms ℹ Vite client warmed up in 2ms ℹ Vite server warmed up in 492ms - The following
nuxt.config.tsconfiguration:
Results in:devtools: { enabled: true }, test: false> pnpm dev > nuxt dev Nuxt 3.17.5 with Nitro 2.11.12 ➜ Local: http://localhost:3000/ ➜ Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v2.5.0) ✔ Vite client built in 45ms ✔ Vite server built in 326ms ✔ Nuxt Nitro server built in 879ms ℹ Vite client warmed up in 2ms ℹ Vite server warmed up in 515ms
Expectation
If this is intentional behavior, it should be clearly documented.
If it's unintended, it might be worth addressing.
Currently, the documentation at https://nuxt.com/docs/getting-started/testing does not mention that enabling test mode disables DevTools.
Suggestion
Either:
- Clarify in the docs that
test: truedisables DevTools (and why), - Or treat it as a bug and allow DevTools to remain active in
testmode unless explicitly disabled.
Final Note
I'm not sure whether this is intended or accidental. Just raising this here so it's visible to the Nuxt team and the community.
I don't want to rule out the possibility that I may have missed something in the documentation. If that's the case, I apologize for the time taken and kindly ask you to close this issue.
Happy to help test further if needed.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.3k
- Fork
- 214
- Merge trung bình
- 19 giờ 45 phút
- Pull request đã merge (30 ngày)
- 12
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 nuxt/devtools
-
fix: Inspect panel styles break when host page sets a custom html font-size (rem-based units) Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
feat: Nuxt devtools for AI Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
bug needs reproduction
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
Tất cả issue của nuxt/devtools
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100