Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Typescript and noEmitOnError regressions/issues

Aperta
#2,023 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
node.js, typescript

Direzione di ricerca

Start with the StackBlitz reproduction linked in the issue and run its npm run build, npm run watch, and npm run typecheck commands. Inspect the @rollup/plugin-typescript handling of noEmitOnError during build and watch mode. Done means all type errors are reported, builds fail without emitting known-bad JavaScript, and watch mode continues and rebuilds after subsequent fixes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Expected Behavior

When noEmitOnError is set, running npm run build (set to rollup -c rollup.config.js) should show all typecheck errors approximately as tsc does, and then fail. Similarly, npm run watch (set to rollup -c rollup.config.js -w) should keep watching even if there are typecheck errors.

Actual Behavior

When npm run build is run, it displays the first typecheck error and then crashes (with a stack trace that takes up several lines of console space, meaning you have to scroll up to see the one error, but I think thatʼs a different issue). It does not display other errors.

When npm run watch is run, it shows just one error (and long stacktrace) and then looks like itʼs going to continue watching, but when you change the file in a way that still fails to typecheck it crashes immediately. If you change the file in a way that does typecheck, then the watch process neither produces any output to the terminal nor actually builds the file.

Additional Information

I added a typecheck script so npm run typecheck can show you all the errors not just the first.

Several previous issues (#255, #258, #272, #492) recommend turning off noEmitOnError at least during a rollup --watch, and at least one PR (#544) claims to do that. I donʼt find that a good fix for a few reasons

  • The README says that used to be an issue but that itʼs now fine to turn on noEmitOnError
  • I do not want to ever emit javascript I know is bad; I do not want to accidentally run it if I fail to pay attention to the window where rollup --watch is running, and I do not want to accidentally build it and then not realize I have known-bad code.
Lingua principale
JavaScript
Stelle
3.8k
Fork
636
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rollup/plugins

Tutte le issue di rollup/plugins

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.