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

Debug Console always shows errors open startup of Codetour #297

Open
AlexanderLill opened this issue Apr 4, 2024 · 1 comment
Open

Debug Console always shows errors open startup of Codetour #297

AlexanderLill opened this issue Apr 4, 2024 · 1 comment

Comments

@AlexanderLill
Copy link

AlexanderLill commented Apr 4, 2024

Hey everyone,

I have the codetours extension installed, and when I open the debug console panel in vscode, the following errors are shown. Maybe there is a way to avoid these when the tours folder does not exist?

Also, it was quite a hassle to identify where these error messages come from, as the debug console does not indicate from which extension/code file the messages originate.

I have version v0.0.59 of CodeTour and version Version: 1.87.2 of vscode.

[node.js fs] readdir with filetypes failed with error:  Error: ENOENT: no such file or directory, scandir '/Users/username/code/reponame/.vscode/tours' {errno: -2, code: 'ENOENT', syscall: 'scandir', path: '/Users/username/code/reponame/.vscode/tours', stack: 'Error: ENOENT: no such file or directory, sca…'/Users/username/code/reponame/.vscode/tours'', …}

extensionHostProcess.js:144
[node.js fs] readdir with filetypes failed with error:  Error: ENOENT: no such file or directory, scandir '/Users/username/code/reponame/.github/tours' {errno: -2, code: 'ENOENT', syscall: 'scandir', path: '/Users/username/code/reponame/.github/tours', stack: 'Error: ENOENT: no such file or directory, sca…'/Users/username/code/reponame/.github/tours'', …}

extensionHostProcess.js:144
[node.js fs] readdir with filetypes failed with error:  Error: ENOENT: no such file or directory, scandir '/Users/username/code/reponame/.tours' {errno: -2, code: 'ENOENT', syscall: 'scandir', path: '/Users/username/code/ts-wifi-test/.tours', stack: 'Error: ENOENT: no such file or directory, scandir '/Users/username/code/reponame/.tours'', …}

Tasks

No tasks being tracked yet.
@AlexanderLill
Copy link
Author

AlexanderLill commented Apr 5, 2024

Seems that the discoverMainTours function uses a try/catch to avoid these errors, while the discoverSubTours function does not do that:

async function discoverMainTours(
workspaceUri: vscode.Uri
): Promise<CodeTour[]> {
const tours = await Promise.all(
MAIN_TOUR_FILES.map(async tourFile => {
try {
const uri = vscode.Uri.joinPath(workspaceUri, tourFile);

async function discoverSubTours(workspaceUri: vscode.Uri): Promise<CodeTour[]> {
const tours = await Promise.all(
SUB_TOUR_DIRECTORIES.map(directory => {
const uri = vscode.Uri.joinPath(workspaceUri, directory);

@AlexanderLill AlexanderLill changed the title Debug Console shows errors Debug Console always shows errors open startup of Codetour Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant