Typescript and noEmitOnError regressions/issues
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
- Ambito
- build-system, tooling
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
- Rollup Plugin Name: @rollup/plugin-typescript
- Rollup Plugin Version: 12.3.0
- Rollup Version: 4.62.4
- Operating System (or Browser): Linux
- Node Version: v24.19.0
- Link to reproduction (⚠️ read below): https://stackblitz.com/edit/rollup-repro-g4psnqpv?file=src%2Fmain.ts
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 --watchis 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
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rollup/plugins
-
@rollup/plugin-virtual: TS2349: This expression is not callable under modern "moduleResolution": "NodeNext"Forse già presa @Boulea7 l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Support js-yaml v5Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Babel 8 supportForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di rollup/plugins
Issue simili
-
good first issue quality
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
StudentSuite/awesome-student-resources#554 ·
I maintainer di solito rispondono entro 1 giorno
-
content good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
StudentSuite/awesome-skills-plugins-for-students#297 ·
I maintainer di solito rispondono entro 1 giorno
-
Link Checker ReportApertaautomated issue report
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100