Open
Description
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
- 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
}
]
}
code repro.code-workspace
- Notice how extensions tree view is empty
- 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