Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Virtual Files tab is empty on Nuxt 5 / Nitro 3: /_vfs.json returns 404

未关闭
#1,127 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
半天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
nuxtjs, typescript, vite
领域
devtools, web-dev

调研方向

Start with the request path: the client fetch of /_vfs.json in the published @nuxt/devtools-assets utils bundle, and the dev-server route app.get("/_vfs/**", createVFSHandler(...)) in nitro/dist/_dev.mjs. Reproduce by hitting /_vfs/ with Accept: application/json on a running nuxt dev server. Done means the Virtual Files tab lists entries again; the issue leaves open whether the fix belongs in DevTools or Nitro, so confirm the side with maintainers first.

由索引模型根据 Issue 内容生成。

描述

Environment
  • @nuxt/devtools 4.0.0-beta.5 (@nuxt/devtools-assets 4.0.0-beta.5)
  • nuxt 5.0.0-2610121449-e69fd4e (nuxt-nightly@5x)
  • nitro 3.0.260903-beta
  • Vite 8.3.4, Node.js 26.11.1, Windows 11
Reproduction
  1. Nuxt 5 nightly app with @nuxt/devtools 4 beta, nuxt dev
  2. Open DevTools, authorize the browser, open the "Virtual Files" tab
  3. The tab stays empty; the dev server logs GET /_vfs.json 404
Cause (as far as I can tell)

The client fetches the file list from /_vfs.json (published bundle: @nuxt/devtools-assets/dist/_nuxt/utils-k1kpr21p.js, $fetch('/_vfs.json', { baseURL: '/', responseType: 'json' })).

Nitro 3's dev server only registers app.get("/_vfs/**", createVFSHandler(this.nitro)) (nitro/dist/_dev.mjs). Checked with curl against the running dev server:

Request Status
GET /_vfs.json 404
GET /_vfs.json/<id> 404
GET /_vfs/ with Accept: application/json 200, JSON (rootDir, entries, current)
GET /_vfs/.json 200, JSON
GET /_vfs/<id> with Accept: application/json 200, JSON

Note that the JSON returned by Nitro 3 still lists entries[].path as /_vfs.json/<id>, which 404s as well. So this could be fixed on either side: DevTools requesting /_vfs/ with Accept: application/json (or /_vfs/.json), or Nitro registering the /_vfs.json/** route again. Happy to open the issue at nitrojs/nitro instead if that is the better place.

主要语言
TypeScript
星标
3.3k
派生
217
平均合并
1 天 4 小时
30 天内合并 PR
21

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nuxt/devtools 的其他 Issue

查看 nuxt/devtools 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。