microsoft / microsoft/TypeScript

[CLI] "@" character removed when it's first path character with --build

Open
#62,373 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Domain: tsc -b Help Wanted
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

### 🔎 Search Terms

"cli", "tsc", "build mode", "path"

### 🕗 Version & Regression Information

- This changed between versions 3.0 and 3.1 (LOL) and continue to 5.9.2

### ⏯ Playground Link

https://github.com/GongT/issues/tree/typescript-path-at-char

### 💻 Code

```bash
# all this is ok
tsc -p @scoped/package/src
tsc -b xxx@yyy/package/src
cd @scoped ; tsc -p package/src

# this is not
tsc -b @scoped/package/src
```

### 🙁 Actual behavior

error TS5083: Cannot read file 'scoped/package/src'.

### 🙂 Expected behavior

It should read `@scoped/package/src(/tsconfig.json)`

### Additional information about the issue

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported behavior with `tsc -b @scoped/package/src`, then compare it with the working `tsc -p @scoped/package/src` cases. The fix is done when build mode preserves the leading `@` and reads `@scoped/package/src/tsconfig.json` as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.