Skip to content

Extension: Silently fails in VSCode workspace when non-existing project defined #215

Open
@AriPerkkio

Description

@AriPerkkio

Describe the bug

The VSCode extension silenty fails when VS Code workspace has a directory defined that doesn't exist. When Select tutorial command is used, an error is shown:

Command 'Select Tutorial' resulted in an error
A system error occurred (ENOENT: no such file or directory, open '/Users/x/non-existing-folder/package.json')

Could we improve the error handling? Or ignore directories that don't exist, instead of crashing?

Steps to reproduce

  1. Create VS Code workspace file repro.code-workspace with content:
{
  "folders": [
    {
      "path": "./non-existing-folder"
    },
    {
      "path": "./tutorial-vite-plugin" // <-- Any existing real tutorial works, use npm create tutorial 
    }
  ]
}
  1. code repro.code-workspace
  2. Notice how extensions tree view is empty
  3. Run Select tutorial from VS Code's command palette (CMD + Shift + P) to see error message

Expected behavior

Remove the non-existing project from workspace configuration and see how extension works again.

Platform

  • TutorialKit version: 0.1.2
  • Extension: 0.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssus related to TutorialKit VS Code extension

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions