Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

usabl init picks one entry file silently when several candidates exist

Closed Beginner friendly
#317 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #347 by @eparenti — merged

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
cli, tooling

Research direction

Start in src/init/index.ts at resolveEntryFile and trace how usabl init builds the usabl.routes.json draft. Check the existing tests for route discovery and ambiguous candidates, if present. When several supported extensions exist for one route, the draft should leave its entry file empty and include a Review: note naming every candidate.

Written by the indexing model from the issue text.

Description

area: setup bug

What happens

resolveEntryFile in src/init/index.ts looks for a route's component file by trying .tsx, .ts, .jsx, and .js in that order, and takes the first one that exists. When more than one exists for the same name, it picks one without saying so, and usabl init writes that file into the usabl.routes.json draft.

Why it matters

The routes sidecar is authoritative once it is committed. A wrong entry file maps changes to the wrong screen: a change to the real component may not queue its screen. This is the same "do not pick one silently" problem that import resolution had for .vue and .svelte siblings.

Expected

When more than one candidate exists, init leaves the entry file empty for that route and writes a Review: note that names every candidate.

Status

Found while building the parser-based router discovery. This is old behavior.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
6h 42m
Merged PRs (30d)
44

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No 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.

More from usabl-dev/usabl

All issues in usabl-dev/usabl

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.