microsoft / microsoft/TypeScript

"This import path is unsafe to rewrite because it resolves to another project" missing an error location

Open
#62,436 1 comment 2 reactions 1 assignee Claimed by @andrewbranch View on GitHub
Dominant language
Go
Stars
111k
Forks
14.3k
PR merge metrics
PR metrics pending

Description

### 🔎 Search Terms

This import path is unsafe to rewrite because it resolves to another project

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________

### ⏯ Playground Link

_No response_

### 💻 Code

Repro steps:

`tsc -b` on https://github.com/andrewbranch/ts-fix-baseurl/commit/0635ce46427b7a36db608891729178d057a69f55

### 🙁 Actual behavior

```
> tsc -b tsconfig.json

error TS2878: This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.

Found 1 error.
```

### 🙂 Expected behavior

Show the error on each broken import path. Red squigglies appear in the correct places in the editor, inside multiple files within `test/`

### Additional information about the issue

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.