Skip to content

Suggestion in error message TS5102 is incorrect #1544

@nivekh

Description

@nivekh

When compiling with a tsconfig present, if the tsconfig has the removed baseUrl option, likeso:

{
  "compilerOptions": {
      "baseUrl": ".",
  [...]
  }
}

the following error message is provided:

> npx tsgo -p .\tsconfig.build.json --noEmit
error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
  Use '"paths": {"*": "./*"}' instead.
Found 1 error.

However, if you update the tsconfig file with the suggested paths value, likeso...

{ 
  "compilerOptions": {
    "paths": { "*": "./*" },
  [...]
  }
}

The following error message appears:

>npx tsgo -p .\tsconfig.build.json --noEmit
error TS5063: Substitutions for pattern '*' should be an array.
Found 1 error.

The error message for TS5102 should probably be updated to suggest the correct format (and maybe TS5063 should give some context? Like, "For option 'paths', substitutions for pattern..."?)

(Version: 7.0.0-dev.20250807.1)

Metadata

Metadata

Assignees

Labels

Domain: ProgramRelated to the Program, file loadingbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions