I'm having a problem with ng test and Angular v21

Aperta
#31,976 14 commenti 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
angular, node.js, typescript
Ambito
cli, testing

Direzione di ricerca

Inizia riproducendo il malfunzionamento con ng test e con pnpm run test nell’ambiente Windows indicato, con Angular CLI 21.0.1, Node.js 24.11.1 e pnpm 10.24.0. Confronta i due percorsi dei comandi e acquisisci l’errore sottostante; il lavoro è completato quando il comando di test segnala un errore utile senza chiudere il terminale.

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

Descrizione

angular/build:unit-test area: @angular/build needs: investigation
Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

No

Description

Let me explain my problem. I'm trying to run tests using ng test, but I don't know why it suddenly closes the terminal and I don't get any errors. If I run pnpm run test or pnpm test using pnpm run test, I get these errors:

ELIFECYCLE Test failed. See above for more details.

I've searched on Google but haven't found anything about this issue.

I'm using a Windows environment.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw
When I launch ng test, my terminal immediately shuts down. But if I run it via `pnpm run test`, I get this error ELIFECYCLE Test failed. See above for more details.
Please provide the environment you discovered this bug in (run ng version)
Angular CLI       : 21.0.1
Angular           : 21.0.1
Node.js           : 24.11.1
Package Manager   : pnpm 10.24.0
Operating System  : win32 x64

┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package                   │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build            │ 21.0.1            │ ^21.0.1           │
│ @angular/cli              │ 21.0.1            │ ^21.0.1           │
│ @angular/common           │ 21.0.1            │ ^21.0.0           │
│ @angular/compiler         │ 21.0.1            │ ^21.0.0           │
│ @angular/compiler-cli     │ 21.0.1            │ ^21.0.0           │
│ @angular/core             │ 21.0.1            │ ^21.0.0           │
│ @angular/forms            │ 21.0.1            │ ^21.0.0           │
│ @angular/platform-browser │ 21.0.1            │ ^21.0.0           │
│ @angular/router           │ 21.0.1            │ ^21.0.0           │
│ rxjs                      │ 7.8.2             │ ~7.8.0            │
│ typescript                │ 5.9.3             │ ~5.9.2            │
│ vitest                    │ 4.0.14            │ ^4.0.8            │
└───────────────────────────┴───────────────────┴───────────────────┘
Anything else?
Image Image
Lingua principale
TypeScript
Stelle
27k
Fork
11.8k
Merge medio
16h 21m
PR unite (30g)
170

Guida per i contributori

Apri la guida per i contributori

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 angular/angular-cli

Tutte le issue di angular/angular-cli

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.