Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are a few possible solutions to rectify the problem of an inaccurate path in the VSCode problem matcher while compiling using $tsc-watch:

  1. Double-check the file paths: Ensure that the file paths specified in your VSCode tasks.json file match the correct file paths in your project directory.

  2. Use relative paths: Instead of specifying absolute file paths, use relative paths in your tasks.json file. This ensures that the file paths are relative to the project directory, rather than the root directory.

  3. Use the CWD (current working directory): Set the task's "cwd" property to the project directory. This ensures that the compiler runs in the project directory, which may resolve any filepath issues.

  4. Use a different problem matcher: You can try using a different built-in problem matcher, or even create a custom problem matcher that more accurately matches your compiler's output.

  5. Upgrade TypeScript: If you're using an older version of TypeScript, upgrading to the latest version may resolve any issues with inaccurate path matching.