CLI help imports nitro/builder before printing usage
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 54/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- cli, developer-experience
Research direction
Start by reading the CLI command modules that import nitro/builder at module scope and the repository’s reproduction steps. Compare command metadata loading with the prototype scripts linked in the issue, then run the documented help and version invocations. Done means help output and exit codes remain unchanged while help commands avoid loading builder dependencies; validate build behavior and dev-server readiness too.
Written by the indexing model from the issue text.
Description
nitro --help loads builder dependencies before printing usage. Citty loads command modules to read their metadata, and several of those modules import nitro/builder at module scope.
The local prototype and benchmark scripts defer implementation imports until a command runs.
Measured with Node 24.21.0, running node dist/cli/index.mjs directly. Medians in milliseconds from 15 fresh processes per case and version, with warm filesystem caches.
| Command | Baseline | Prototype |
|---|---|---|
--help |
129.0 | 27.3 |
build --help |
123.0 | 28.0 |
dev --help |
123.4 | 27.0 |
--version |
27.3 | 26.9 |
| Build, 1 route | 230.2 | 230.7 |
| Build, 100 routes | 266.4 | 268.2 |
Recorded samples and full summary.
The prototype matched baseline output and exit codes for 18 help, version and error invocations. Build time showed no measurable improvement. Only build ran as a real command, and dev-server readiness wasn't measured. The repository includes reproduction steps; the complete clean install/build recipe has not been run end to end.
Could help read command metadata without loading the builder? Happy to open pr :)
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 936
- Avg merge
- 22h 2m
- Merged PRs (30d)
- 176
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nitrojs/nitro
-
v2: backport #4683 (a package's own entry is externalized as `pkg/`, DEP0155)Possibly taken A pull request linked to this issue is open or already merged. Opennuxt reproduction v2
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
Maintainers usually reply within 1 day
-
bug externals nuxt v2 windows
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
nitrojs/nitro#4761 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation v3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nitrojs/nitro#4555 · 5 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
Maintainers usually reply within 2 days
-
BeOS .json missingOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mihaip/infinite-mac#475 ·
-
Let TypeScript accept an initial object in ReactiveDictPossibly taken @yograj-vijay-yadav claimed this today. Openbug good first issue help wanted workshop
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
meteor/meteor#14919 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
marmelab/atomic-crm#401 ·
Maintainers usually reply within 1 day
-
account: profile
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 5 days