nitrojs / nitrojs/nitro

exit with code (1) on build warnings

Open
#1,619 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement nuxt v2
Dominant language
TypeScript
Stars
11.2k
Forks
899
Avg merge
2d 24m
Merged PRs (30d)
40

Description

Build warnings (specially the ones related to externals) can cause the deployment to be failed (example: https://github.com/unjs/nitro-deploys/issues/83) and this goes unnoticed during whole CI/CD and deploy pipeline.

I think it would be safer to fail CLI by code (1) by default with an explicit flag to opt-out. (this will be available for nitro CLI, framework integrations such as nuxi need to do it themselves and we need to somehow expose warnings information to them /cc @danielroe)

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 with the Nitro CLI build path and the warning behavior described in the issue; no files or tests are named, so first map where build warnings are produced and whether framework integrations can access them. Done means warnings cause the CLI to exit with code 1 by default, with an explicit opt-out, and the warning information is exposed for integrations such as nuxi.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, ci-cd, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.