nuxt / nuxt/devtools

fix: cannot "go to file" when using dynamic routes on Windows

Open
#707 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
3.3k
Forks
214
Avg merge
13h 22m
Merged PRs (30d)
18

Description

🐛 The bug

The Component Inspector on Nuxt DevTools can't open a file in the editor if using square brackets on the file name (eg: dynamic routes), which works normally on Linux.

🛠️ To reproduce

https://github.com/ojvribeiro/nuxt-devtools-issue

To reproduce is necessary to be in a Windows enviroment:

  • Run the attached reproduction
  • Click the "Nested Page" link to go to the nested page
  • Use the component inspection tool to select the "Nested child" heading

image

Then see the error in the terminal:

image

🌈 Expected behavior

It's expected to go to file on component inspection on Windows. I'm not sure since when this bug started to happen. It worked fine some time ago.

ℹ️ Additional context

Nuxt project info: 23:57:39


  • Operating System: Windows_NT
  • Node Version: v20.13.1
  • Nuxt Version: 3.12.4
  • CLI Version: 3.11.1
  • Nitro Version: -
  • Package Manager: pnpm@9.4.0
  • Builder: -
  • User Config: devtools, compatibilityDate
  • Runtime Modules: -
  • Build Modules: -

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked reproduction on Windows and tracing the Component Inspector's "go to file" path after selecting the nested child heading. Focus on how square brackets in dynamic-route filenames are handled; done means the editor opens the selected file successfully on Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
developer-experience, devtools, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.