fix: Cannot open file in Sublime Text
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- node.js, nuxtjs, typescript
- Domain
- developer-experience, tooling
Research direction
Start at packages/devtools/src/server-rpc/general.ts around line 227 and trace how the configured Sublime Text editor is passed to launch-editor. Reproduce on Linux with subl on PATH, then verify that opening a file launches Sublime Text instead of attempting the nonexistent sublime command.
Written by the indexing model from the issue text.
Description
🐛 The bug
I selected Sublime Text as my editor in the Nuxt devtools setting, but the file is not opened. Reading the exception on the console, this makes sense because apparently it tries to launch an executable named sublime, which does not exist. The expected executable name on Linux platform is subl, which is also configured as such in launch-editor.
The error:
The editor process exited with an error: spawn sublime ENOENT ('sublime' command does not exist in 'PATH').
Now, I do not know if this is an issue in launch-editor, but seeing how manually overriding the LAUNCH_EDITOR environment variable neither in the command that calls npm, nor in the .env file makes any difference, I suspect that the Nuxt devtools might be using this library incorrectly. I tried subl and sublime_text as values.
The library is invoked here:
🛠️ To reproduce
- Ensure Sublime Text is installed (or create a fake
sublexecutable on a Linux system) - Configure "Sublime Text" to be the editor in devtools.
- Try to open an file in your editor.
🌈 Expected behavior
The file is opened in my local Sublime Text editor.
ℹ️ Additional context
I am using Arch Linux and installed Sublime Text using the official repository. subl is available on my $PATH and works in the terminal.
- Dominant language
- TypeScript
- Stars
- 3.3k
- Forks
- 214
- Avg merge
- 19h 45m
- Merged PRs (30d)
- 12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nuxt/devtools
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
bug needs reproduction
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·