Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AriPerkkio opened this issue Aug 5, 2024 · 0 comments
Labels
bug Something isn't working extension Issus related to TutorialKit VS Code extension

Comments

@AriPerkkio
Copy link
Member

AriPerkkio commented Aug 5, 2024

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
@AriPerkkio AriPerkkio added bug Something isn't working extension Issus related to TutorialKit VS Code extension labels Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working extension Issus related to TutorialKit VS Code extension
Projects
None yet
Development

No branches or pull requests

1 participant