Skip to content

VS Code tasks fail to run when esbuild-problem-matchers extension is not installed #545

@minus43

Description

@minus43

Problem

This project ships a .vscode/tasks.json that references the $esbuild-watch problem matcher:

"problemMatcher": "$esbuild-watch"

However, $esbuild-watch is not a built-in VS Code problem matcher and is only available when the esbuild-problem-matchers extension is installed.

When the extension is not installed, VS Code fails to activate tasks entirely with the following error:

Activating task providers
npm Error: Invalid problemMatcher reference: $esbuild-watch

This prevents users from running or testing tasks at all.


Why this is an issue

  • esbuild itself runs correctly without any VS Code extension
  • problemMatchers are a UX feature, not a runtime requirement
  • however, VS Code treats unknown problemMatchers as a hard error
  • as a result, tasks become unusable unless a specific extension is installed

This effectively makes the extension a mandatory dependency, even though it should be optional.


Expected behavior

One of the following:

  • tasks should still run even if the problemMatcher is unavailable, or
  • the tasks configuration should not hard-depend on external problemMatchers, or
  • VS Code should support optional / soft problemMatcher references

Suggested solutions

  • Provide tasks without external problemMatchers by default
  • Document the problemMatcher as optional
  • Or provide separate tasks for enhanced UX when the extension is installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions